This also includes
any text that is embedded in a graphical image and so in order to provide for multiple languages, the image
files need to be separated out into generic and language specific if text is used in images.
There are multiple methods of doing the actual translation but they all boil down to the same thing. Every
string displayed on the site needs to be mapped to a string in the target language. It follows that it is important
that the strings are rewritten using a professional translator as there is rarely a one-to-one mapping from one
language to the next. Industry standard systems such as gettext() have many tools available dedicated to
Licensed to Menshu You
Zend Framework in Action (Ch01) Manning Publications Co. 36
making it simple for a translator to perform the translation of phrases used in the application without having to
know anything about programming.
14.1.2 Translating idioms
The most obvious idioms that need translation are the formatting of currency and dates. PHP has locale support
built in that is set using the setlocale() function. Once the locale is set, then all the locale-aware functions
will use it. This means that strftime() will use the correct language for the months of the year and
money_format() will use the comma and period characters in the right place for the language involved.
Pages:
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343