Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
COSMOS Design 281219
Contents
Code to dynamically load localization translation string file
This is the design document for bugzilla 281219.
Change History
Name: | Date: | Revised Sections: |
---|---|---|
Josh Hester | July 14, 2009 |
|
Workload Estimation
Process | Sizing | Names of people doing the work |
---|---|---|
Design | 1 | Josh Hester |
Code | 1 | Josh Hester |
Test | 1 | Josh Hester |
Documentation | 0 | |
Build and infrastructure | 0 | |
Code review, etc.* | 1 | |
TOTAL | 1 |
'* - includes other committer work (e.g. check-in, contribution tracking)
Purpose
This code will detect the country of the running JRE and then load the appropriate country's translation strings.
Requirements
- This code must determine the appropriate country and its country code.
- This code must load the appropriate translation key file based on the country code.
Design details
- This code will use the java Locale api to determine the current country code in the following fashion:
Locale locale = Locale.getDefault(); locale.getLanguage()
Then it will load the appropriate property code based on a file name specified by the country code.
Impacts of this enhancement
- The SDD runtime will be able to dynamically load localization files for the translation strings used in the UI.
Open Issues/Questions
Do we need to code in any exceptions, for instance if a country's file is not found?