Wordpress supports Localization using the gettext framework. l10n global variable is used to store all the readers corresponding to the different languages supported. It is set in the function load_textdomain($domain, $mofile) defined in [wordpress root folder]/wp-includes/wp-l10n.php. Following functions are defined which internally use this function:
load_default_textdomain(): loads the default textdomainload_plugin_textdomain($domain, $path = 'wp-content/plugins'): loads text domain defined in the pluginsload_theme_textdomain($domain): loads text domain defined in the theme
Loading of the text domain involves looking up for corresponding mo file with the same name as the locale.
The default domain is loaded using the function load_default_textdomain() in [wordpress root folder]/wp-settings.php.
Plugin or theme developers need not use this global variable directly. Wordpress provides functions to translate text in localized language.
Back to full list of global variables.
Technorati tags: localization, internationalization, l10n, i18n, gettext



August 8th, 2006 at 4:32 pm
[...] Wordpress uses weekday global variable to access, exactly what it says, names of the weekdays. It is a one dimensional array set in the file [wordpress root folder]/wp-includes/locale.php. It stores localized values. Additional global variables like weekday_initial, weekday_abbrev, month, month_abbrev are also defined. [...]