set_locale_base_url

set_locale_base_url(value)

Set where documents running the bundled maidr.js find locale packs.

Parameters

Name Type Description Default
value str, False, or None * A URL: the directory holding locale-<code>.js. It is declared in every document py-maidr produces, including those that load maidr.js from the CDN, so a self-hosted copy of the packs serves them all. * "" or False: declare nothing. A document running the bundled copy then makes no request for a language and stays in English. * None (default state): defer to MAIDR_LOCALE_BASE_URL, and then to the packs of the bundled version on jsDelivr. required

Raises

Name Type Description
TypeError If value is none of the above.

Notes

Process-wide state, like :func:maidr.set_use_cdn: in a server handling several sessions, set it once at startup.