l10n

Model for localization helpers, including countries, country names, available timezones, and site timezone settings.

Available Model API Paths

MethodPath patternDescription
get/countries/...Return all ISO country codes with country names translated in the current context language, sorted by translated name.
get/country_name/+code/...Return the translated country name for ISO code +code using language fallback rules; returns +code itself when unknown.
get/timezones/...Return all timezone identifiers from the bundled timezone database (qdate_localtime) as binaries.
get/default_timezone/...Return site timezone setting mod_l10n.timezone used as default timezone.
get/timezone_is_fixed/...Return site flag mod_l10n.timezone_is_fixed indicating if user timezone selection is disabled.

/+name marks a variable path segment. A trailing /... means extra path segments are accepted for further lookups.

Edit on GitHub