generateLanguageList [line 145]
Returns an array of available language locales.
Parameters:
array generateLanguageList(
[ $all = false]
)
|
|
getAllTranslations [line 561]
returns a serialized "multilingual array" of translations Used for setting default options with multi-lingual strings.
Parameters:
|
string |
$text: |
to be translated |
void getAllTranslations(
string $text
)
|
|
gettext_pl [line 248]
Gettext replacement function for separate translations of third party plugins within the root plugins folder.
Parameters:
|
string |
$string: |
The string to be translated |
|
string |
$plugin: |
The name of the plugin. Required. |
string gettext_pl(
string $string, string $plugin
)
|
|
gettext_th [line 231]
Gettext replacement function for separate translations of third party themes.
Parameters:
|
string |
$string: |
The string to be translated |
|
string |
$theme: |
The name of the plugin. Only required for strings on the 'theme_description.php' file like the general theme description. If the theme is the current theme the function sets it automatically. |
string gettext_th(
string $string, [string $theme = '']
)
|
|
getTimezones [line 505]
Returns a list of timezones
getUserLocale [line 417]
Returns a saved (or posted) locale. Posted locales are stored as a cookie.
Sets the 'locale' option to the result (non-persistent)
get_language_string [line 478]
Returns the sring for the current language from a serialized set of language strings Defaults to the string for the current locale, the en_US string, or the first string which ever is present
Parameters:
|
string |
$dbstring: |
either a serialized languag string array or a single string |
|
string |
$locale: |
optional locale of the translation desired |
string get_language_string(
string $dbstring, [string $locale = NULL]
)
|
|
i18nSetLocale [line 261]
Wrapper function for setLocale() so that all the proper permutations are used
Returns the result from the setLocale call
Parameters:
|
$locale |
$locale: |
the local desired |
string i18nSetLocale(
$locale $locale
)
|
|
parseHttpAcceptLanguage [line 351]
This function will parse a given HTTP Accepted language instruction (or retrieve it from $_SERVER if not provided) and will return a sorted array. For example, it will parse fr;en-us;q=0.8
Thanks to Fredbird.org for this code.
Parameters:
|
string |
$str: |
optional language string |
array parseHttpAcceptLanguage(
[string $str = NULL]
)
|
|
setMainDomain [line 204]
Sets the locale, etc. to the zenphoto domain details.
Returns the result of setupCurrentLocale()
setPluginDomain [line 195]
Sets the optional textdomain for separate translation files for plugins.
The plugin translation files must be located within zp-core/plugins/<plugin name>/locale/<language locale>/LC_MESSAGES/ and must have the name of the plugin (<plugin name>.po <plugin name>.mo)
Return value is the success of the setlocale() call
Parameters:
|
string |
$plugindomain: |
The name of the plugin |
API Tags:
bool setPluginDomain(
string $plugindomain
)
|
|
setThemeDomain [line 221]
Sets the optional textdomain for separate translation files for themes.
The plugin translation files must be located within zenphoto/themes/<theme name>/locale/<language locale>/LC_MESSAGES/ and must have the name of the theme (<theme name>.po <theme name>.mo)
Return value is the success of the setlocale() call
Parameters:
|
string |
$plugindomain: |
The name of the theme |
|
|
$themedomain: |
|
API Tags:
bool setThemeDomain(
$themedomain, string $plugindomain
)
|
|
setupCurrentLocale [line 307]
Setup code for gettext translation Returns the result of the setlocale call
Parameters:
|
string |
$override: |
force locale to this |
|
string |
$plugindomain: |
domain |
|
string |
$type: |
case for settign domain |
mixed setupCurrentLocale(
[string $override = NULL], string $plugindomain, string $type
)
|
|
setupDomain [line 277]
Sets the translation domain and
Parameters:
|
$domaine |
$domain: |
|
|
$type |
$type: |
|
void setupDomain(
[$domaine $domain = NULL], [$type $type = NULL]
)
|
|
setupLanguageArray [line 11]
void setupLanguageArray(
)
|
|
timezoneDiff [line 536]
Returns the difference between the server timez one and the local (users) time zone
Parameters:
|
string |
$server: |
|
|
string |
$local: |
|
int timezoneDiff(
string $server, string $local
)
|
|
validateLocale [line 391]
checks a "supplied" locale against the valid locales.
Returns a valid locale if one exists else returns NULL
Parameters:
|
string |
$userlocale: |
|
|
|
$source: |
|
void validateLocale(
string $userlocale, $source
)
|
|