set method):
Locale.set 'de-DE'
puts @product.price.format(:code => true)
# >> 1.000,00 EUR
Rails L10n | 257
Note that unlike the Money library, which handles basic currency exchange, you
will need to handle any exchange calculations yourself when using Globalize. The
Globalize library only takes care of formatting, not the semantics of the currency.
Model Translation
Model translation is the most complicated, least standardized, and most applicationdependent
part of localization. Model translation or content translation refers to the
translation of the content stored within an application for multiple locales. This kind
of localization is the most difficult because it is application-specific. Often, the translation
cycles are much tighter than when only the application itself is localized.
The premier example of an application with a need for content translation is a web
content-management system. Often, web pages and documents need to be maintained
in parallel in many languages. One of the key selling points of enterprise
content-management systems over their open source brethren is rock-solid support
for managing translations and their workflow.
In these applications, workflow is the key application-dependent factor. The actual
technical practice of selecting and displaying the proper content for a user??™s locale is
dead simple compared to the work of coordinating to make sure the content is translated
and available.
Pages:
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401