Wordpress supports internationalization (i18n) and localization (l10n). A locale is indicated by the combination of the language and the region (usually the country). It is represented with ISO codes of the language and countries, e.g., en_US for US Enligsh, en_GB for British English and so on. US English is the default locale. locale global variable is used to store the current locale. It is set in the function get_locale() defined in [wordpress root folder]/wp-includes/wp-l10n.php.
Wordpress uses this global variable internally to load the current locale. If the locale is not set already, it takes the value of WPLANG defined in [wordpress root folder]/wp-config.php. If that is empty it falls back to the default locale which is US English.
Plugin and theme developers need not use this global variable as it is part of the internationalization and localization framework. Wordpress provides functions for translation.
Back to full list of global variables.
Technorati tags: localization, internationalization, i18n, l10n, locale

October 23rd, 2007 at 8:14 pm
[...] $locale [...]