23
validatelocale
validate_locale
SYNOPSIS
validate_locale($locale)
DESCRIPTION
validate_locale returns true if $locale is one of the supported language codes.
The supported language codes are defined by the global variable $system_languages in config.inc.
CODE
- function validate_locale($locale) {
- global $system_languages;
- return in_array($locale, $system_languages);
- }
Comments