[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
[Code source] [Imprimer] [Statistiques]
This file implements functions for handling locales and i18n. This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.
Author: | blueyed: Daniel HAHLER. |
Author: | fplanque: Francois PLANQUE. |
Copyright: | (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/} |
Version: | $Id: _locale.funcs.php,v 1.4 2007/11/03 21:04:27 fplanque Exp $ |
Poids: | 1020 lignes (28 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
T_( $string, $req_locale = '' ) X-Ref |
Pas de description |
T_( $string, $req_locale = '' ) X-Ref |
T_( $string, $req_locale = '' ) X-Ref |
TS_( $string, $req_locale = '' ) X-Ref |
Translate and escape single quotes. This is to be used mainly for Javascript strings. param: string String to translate param: string Locale to use return: string |
locale_temp_switch( $locale ) X-Ref |
Temporarily switch to another locale Calls can be nested, see {@link locale_restore_previous()}. param: string locale to activate return: boolean true on success, false on failure |
locale_restore_previous() X-Ref |
Restore the locale in use before the switch return: boolean true on success, false on failure (no locale stored before) |
locale_activate( $locale ) X-Ref |
Activate a locale. param: string locale to activate param: boolean True on success/change, false on failure (if already set or not existant) |
locale_by_lang( $lang, $fallback_to_default = true ) X-Ref |
locale_by_lang(-) Find first locale matching lang |
locale_lang( $disp = true ) X-Ref |
Displays/Returns the current locale. (for backward compatibility) This is for HTML lang attributes param: boolean true (default) if we want it to be outputted return: string current locale, if $disp = false |
locale_charset( $disp = true ) X-Ref |
Returns the charset of the current locale |
locale_datefmt( $locale = NULL ) X-Ref |
Returns the current locale's default date format param: string Locale, must be set in {@link $locales} return: string Date format of the locale, e.g. 'd.m.Y' |
locale_timefmt() X-Ref |
Returns the current locale's default time format |
locale_shorttimefmt() X-Ref |
Returns the current locale's default short time format |
locale_datetimefmt( $separator = ' ' ) X-Ref |
Pas de description |
locale_startofweek() X-Ref |
Returns the current locale's start of week return: integer 0 for Sunday, 1 for Monday |
locale_country( $locale = '' ) X-Ref |
Get the country locale param: string locale to use, '' for current return: string country locale |
locale_dialing_code( $locale = '' ) X-Ref |
Get the locale country dialing code |
locale_flag( $locale = '', $collection = 'w16px', $class = 'flag', $align = '', $disp = true, $absoluteurl = true ) X-Ref |
Template function: Display locale flag param: string locale to use, '' for current param: string collection name (subdir of img/flags) param: string name of class for IMG tag param: string deprecated HTML align attribute param: boolean to echo or not param: mixed use absolute url (===true) or path to flags directory |
locale_options( $default = '', $disp = true ) X-Ref |
[callback function] Outputs an <option> set with default locale selected param: string default value param: boolean echo output? |
locale_options_return( $default = '' ) X-Ref |
[callback function] Returns an <option> set with default locale selected param: string default value |
locale_from_httpaccept() X-Ref |
Detect language from HTTP_ACCEPT_LANGUAGE First matched full locale code in HTTP_ACCEPT_LANGUAGE will win Otherwise, first locale in table matching a lang code will win return: locale made out of HTTP_ACCEPT_LANGUAGE or $default_locale, if no match |
locale_priosort( $a, $b ) X-Ref |
user sort function to sort locales by priority 1 is highest priority. |
locale_overwritefromDB() X-Ref |
load locales from DB into $locales array. Also sets $default_locale. return: mixed new default locale on succes, false on failure |
locale_updateDB() X-Ref |
Write $locales array to DB table |
convert_charset( $string, $dest_charset, $src_charset ) X-Ref |
Convert a string from one charset to another. param: string String to convert param: string Target charset (TO) param: string Source charset (FROM) return: string Encoded string (if it cannot be converted it's the original one) |
can_convert_charsets( $dest_charset, $src_charset ) X-Ref |
Can we convert from charset A to charset B? param: string Target charset (TO) param: string Source charset (FROM) return: boolean |
init_charsets( $req_io_charset ) X-Ref |
Init charset handling between Input/Output ($io_charset) and the internal handling ($evo_charset). Check and possibly adjust {@link $evo_charset}. param: string I/O (input/output) charset to use return: boolean true, if encoding has been changed |
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |