Prev | Current Page 401 | Next

W. Jason Gilmore

"Beginning PHP and MySQL: From Novice to Professional"


You can retrieve a list of the language and country codes at http://msdn.microsoft.com.
?– Tip On some Unix-based systems, you can determine which locales are supported by running the
command locale -a.
It??™s possible to specify a locale for a particular classification of data. Six different
categories are supported:
LC_ALL: This sets localization rules for all of the following five categories.
LC_COLLATE: String comparison. This is useful for languages using characters such
as ?? and ?©.
LC_CTYPE: Character classification and conversion. For example, setting this category
allows PHP to properly convert ?? to its corresponding uppercase representation
of ?‚ using the strtolower() function.
LC_MONETARY: Monetary representation. For example, Americans represent dollars
in this format: $50.00; Europeans represent euros in this format: 50,00.
LC_NUMERIC: Numeric representation. For example, Americans represent large
numbers in this format: 1,412.00; Europeans represent large numbers in this
format: 1.412,00.
LC_TIME: Date and time representation. For example, Americans represent dates
with the month followed by the day, and finally the year. February 12, 2005, would
be represented as 02-12-2005. However, Europeans (and much of the rest of the
world) represent this date as 12-02-2005. Once set, you can use the strftime()
function to produce the localized format.


Pages:
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413