Its prototype follows:
string setlocale(mixed category, string locale [, string locale...])
string setlocale(mixed category, array locale)
Localization strings officially follow this structure:
language_COUNTRY.characterset
For example, if you want to use Italian localization, the locale string should be set to
it_IT. Israeli localization would be set to he_IL, British localization to en_GB, and
United States localization to en_US. The characterset component would come into
play when potentially several character sets are available for a given locale. For example,
the locale string zh_CN.gb18030 is used for handling Mongolian, Tibetan, Uigur, and
Yi characters, whereas zh_CN.gb3212 is for Simplified Chinese.
CHAPTER 1 2 ?– D ATE AND T IME 335
You??™ll see that the locale parameter can be passed as either several different strings or
an array of locale values. But why pass more than one locale? This feature is in place
(as of PHP version 4.2.0) to counter the discrepancies between locale codes across
different operating systems. Given that the vast majority of PHP-driven applications
target a specific platform, this should rarely be an issue; however, the feature is there
should you need it.
Finally, if you??™re running PHP on Windows, keep in mind that, apparently in the interests
of keeping us on our toes, Microsoft has devised its own set of localization strings.
Pages:
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412