mod_l10n

Localization of Zotonic. Provides lookups for country, month, week names. Localization module providing locale, country, and timezone data and related helpers.

Accepted Events

This module handles the following notifier callbacks:

  • observe_admin_menu: Add localization and timezone settings entries to the admin menu.
  • observe_pivot_rsc_data: Expand the two letter iso code country depending on the languages in the resource using m_l10n:country_name.
  • observe_request_context: Check if the user has a preferred timezone using z_acl:user.
  • observe_user_context: Set user context language/timezone defaults based on the user profile resource.

Edit on GitHub

Configuration

Configuration keys declared by this module. The defaults below are from the source code.

Module Key Type Default Description
mod_l10n timezone_is_fixed boolean false If true, all dates are displayed in the configured timezone.
mod_l10n timezone string [] The default timezone to use for this site. Defaults to the Zotonic config 'timezone', which defaults to UTC.

Observes

Notifications

observe_user_context/3

Set #context fields depending on the user and/or the preferences of the user.

Models

Models

l10n

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

Dispatch rules

Dispatch rules

mod_l10n dispatch rules

URL dispatch rules defined by mod_l10n in apps/zotonic_mod_l10n/priv/dispatch/dispatch.