100 likes | 275 Vues
Internationalization. Net.Orange. Internationalization. Scope. What items are affected? Images (No locale-specific images) Text Values Dates Where does internationalization occur? Infrastructure ( xd tags) Code (product pages) Data (cOS response) What triggers internationalization?
E N D
Internationalization Net.Orange
Internationalization Scope • What items are affected? • Images (No locale-specific images) • Text • Values • Dates • Where does internationalization occur? • Infrastructure (xd tags) • Code (product pages) • Data (cOS response) • What triggers internationalization? • Everything is keyed off the client.locale variable.
Internationalization Changing the Locale • Systematically <cfsetclient.locale = url.locale> • User Profile Set in user profile and called in as client.locale at login. • User Selectable Using the locale selector toolbar tool at /ndoXd/tools/localeSelector
Internationalization Adding Locale-specific resources • Locale resources are located at /ndoXd/i18n/locales/ • One file per locale • Pipe delimited • Value|Substitution format • Example of es.txt
Internationalization Text Usage - Tag • Tags have built in localization keyed off the client.locale variable. • Values are handled, content is not. • Example: • “Actions” renders as “Acciones” is the locale is set to es.
Internationalization Text Usage - Code • Content-based code must use the transform. • How to use… • Include the i18n processing file. • Wrap text in the function
Internationalization Date Usage- Code • Use the built-in ColdFusion LSDateFormat(date, ‘short’) • It is keyed off the client.locale • Will generate region-specific date formats
Internationalization Currency Usage- Code • Use the built-in ColdFusion LSCurrencyFormat(value) • It is keyed off the client.locale • Will generate region-specific currency formats
Internationalization Sample – English/Default Item Label Item Description to explain what the item is. Item Label Title of Screenshot
Internationalization Sample – Spanish Tag-based Code-based