The Translated Strings and Foreign Language Support in JavaScript Web Apps on the OSCON site.
Ken Tabor (Sabre Holdings)
5:00pm Wednesday, 07/24/2013
Translating:
what - date/time formatters
where - single page app
Basic solution
- string table, disconnects string from code
Never hard code text string
string-tables must be easily accessed throught the application
language string-tables must be demand-loadable resource.
- Combine duplicating strings
- Stop nearly duplicated string
- Easier word-smithing
- Setup for translation services
- Abstract away date/time formatting
RequireJS
RequireJS has 'i18n' plugin
Auto-loads based on navigator.language
At the cost of user control
Testing
- test entire app in Englsih
- native speaker confirms translations
- wait on bug reports
Automate testing with Jasmine and Selenium
Server-side errors - return codes and not string
Ken Tabor (Sabre Holdings)
5:00pm Wednesday, 07/24/2013
Translating:
what - date/time formatters
where - single page app
Basic solution
- string table, disconnects string from code
Never hard code text string
string-tables must be easily accessed throught the application
language string-tables must be demand-loadable resource.
- Combine duplicating strings
- Stop nearly duplicated string
- Easier word-smithing
- Setup for translation services
- Abstract away date/time formatting
RequireJS
RequireJS has 'i18n' plugin
Auto-loads based on navigator.language
At the cost of user control
Testing
- test entire app in Englsih
- native speaker confirms translations
- wait on bug reports
Automate testing with Jasmine and Selenium
Server-side errors - return codes and not string
No comments:
Post a Comment