private Collection < Locale > initLocales ( ) { Collection < Locale > locales = null ; switch ( m_bundleType ) { case DESCRIPTOR : locales = new ArrayList < Locale > ( 1 ) ; locales . add ( Descriptor . LOCALE ) ; break ; case XML : case PROPERTY : locales = OpenCms . getLocaleManager ( ) . getAvailableLocales ( m_cms , m_resource ) ; break ; default : throw new IllegalArgumentException ( ) ; } return locales ; }
Initializes the locales that can be selected via the language switcher in the bundle editor .