Ignore:
Timestamp:
2008-10-10T13:49:43+13:00 (16 years ago)
Author:
oranfry
Message:

made pages reinitialise just before they are shown and added an option to selectinput to change the locale, the end result of this being that you can change the language of the installer as it runs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/input/SelectInput.java

    r17514 r17516  
    7070        }
    7171        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;
    7475            }
    7576            return text;
     
    8182        if ( useAsLocale ) {
    8283            //expect something like 'en' or or something like 'en_US'
     84            Locale newLocale = null;
    8385            if ( value.length() == 2 ) {
    84                 Locale.setDefault( new Locale(value) );
     86                newLocale = new Locale(value);
     87                Locale.setDefault( newLocale );
    8588            } 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 );
    8791            } //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 );
    8993        }
    9094    }
Note: See TracChangeset for help on using the changeset viewer.