public void setLocale ( final Locale locale ) { if ( ! localePreference . isCurrent ( locale ) ) { setView ( getCurrentView ( ) , new Action ( ) { private boolean reloaded = false ; @ Override public boolean act ( final float delta ) { if ( ! reloaded ) { reloaded = true ; localePreference . setLocale ( locale ) ; localePreference . save ( ) ; reloadViews ( ) ; } return true ; } } ) ; } }
Also available as setLocale action in LML views . Will extract locale from actor s ID .