I18n handles translation of Text and time format strings.
__construct( )
Constructor, use I18n::getInstance() to get the i18n translation object.
_bindTextDomain( string $domain )
Binds the given domain to a file in the specified directory.
$domain
string
_parseLiteralValue( string $string )
Auxiliary function to parse a symbol from a locale definition file
$string
string
_pluralGuess( string $header , integer $n )
Attempts to find the plural form of a string.
$header
$n
integer
_translateTime( string $format , string $domain )
Returns a Time format definition from corresponding domain
$format
$domain
mixed
getInstance( )
Return a static instance of the I18n class
I18n
insertArgs( string $translated , array $args )
Puts the parameters in raw translated strings
$translated
$args
string
loadLocaleDefinition( string $filename )
Parses a locale definition file following the POSIX standard
$filename
mixed
loadMo( string $filename )
Loads the binary .mo file and returns array of translations
$filename
mixed
loadPo( string $filename )
Loads the text .po file and returns array of translations
$filename
mixed
translate( string $singular , string $plural null , string $domain null , string $category I18n::LC_MESSAGES , integer $count null , string $language null , string $context null )
Used by the translation functions in basics.php Returns a translated string based on current language and translation files stored in locale folder
$singular
$plural
optional null $domain
optional null $category
optional I18n::LC_MESSAGES
$count
optional null $language
optional null $context
optional null string
CakeException
integer | LC_ALL Constant for LC_ALL. | 0 |
integer | LC_COLLATE Constant for LC_COLLATE. | 1 |
integer | LC_CTYPE Constant for LC_CTYPE. | 2 |
integer | LC_MESSAGES Constant for LC_MESSAGES. | 6 |
integer | LC_MONETARY Constant for LC_MONETARY. | 3 |
integer | LC_NUMERIC Constant for LC_NUMERIC. | 4 |
integer | LC_TIME Constant for LC_TIME. | 5 |
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/2.7/class-I18n.html