generateLanguageList [line 147]
Returns an array of available language locales.
array generateLanguageList(
)
|
|
generateLanguageOptionList [line 177]
Generates the option list for the language selectin <select>
Parameters:
|
bool |
$HTTPAccept: |
set to true to include the HTTPAccept item |
void generateLanguageOptionList(
bool $HTTPAccept
)
|
|
getUserLocale [line 338]
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 385]
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]
)
|
|
parseHttpAcceptLanguage [line 297]
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 210]
Sets the locale, etc. to the zenphoto domain details.
setPluginDomain [line 202]
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 |
bool setPluginDomain(
string $plugindomain
)
|
|
setThemeDomain [line 226]
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: |
|
bool setThemeDomain(
$themedomain, string $plugindomain
)
|
|
setupCurrentLocale [line 236]
Setup code for gettext translation Returns the result of the setlocale call
Parameters:
mixed setupCurrentLocale(
[ $plugindomain = ''], [ $type = '']
)
|
|
setupLanguageArray [line 12]
void setupLanguageArray(
)
|
|