Changeset 17516 for release-kits/shared/ant-installer/src/org/tp23/antinstaller/input/SelectInput.java
- Timestamp:
- 2008-10-10T13:49:43+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
release-kits/shared/ant-installer/src/org/tp23/antinstaller/input/SelectInput.java
r17514 r17516 70 70 } 71 71 public String getText() { 72 if( org.tp23.antinstaller.Installer.langPack != null ){ 73 return org.tp23.antinstaller.Installer.langPack.getString(getProperty() + "." + idx +".displayText"); 72 if( org.tp23.antinstaller.Installer.langPack != null ) { 73 String r = org.tp23.antinstaller.Installer.langPack.getString( getProperty() + "." + idx + ".displayText" ); 74 if ( r != null ) return r; 74 75 } 75 76 return text; … … 81 82 if ( useAsLocale ) { 82 83 //expect something like 'en' or or something like 'en_US' 84 Locale newLocale = null; 83 85 if ( value.length() == 2 ) { 84 Locale.setDefault( new Locale(value) ); 86 newLocale = new Locale(value); 87 Locale.setDefault( newLocale ); 85 88 } else if ( value.length() == 5 ) { 86 Locale.setDefault( new Locale(value.substring(0,2), value.substring(3,5)) ); 89 newLocale = new Locale(value.substring(0,2), value.substring(3,5)); 90 Locale.setDefault( newLocale ); 87 91 } //else { you're out of luck } 88 org.tp23.antinstaller.Installer.langPack = ResourceBundle.getBundle("resources.LanguagePack" );92 org.tp23.antinstaller.Installer.langPack = ResourceBundle.getBundle("resources.LanguagePack", newLocale ); 89 93 } 90 94 }
Note:
See TracChangeset
for help on using the changeset viewer.