2016-11-19 4 views

答えて

0

実行時にリソース設定を更新して、アプリケーション言語を変更できます。このコードのように:

Resources res=getResources(); 
    Configuration config = res.getConfiguration(); 
    Locale locale = new Locale("fr");//change to the France language 
    Locale.setDefault(locale); 
    config.locale = locale; 
    res.updateConfiguration(config, res.getDisplayMetrics()); 
+0

ありがとう。あなたのコードは明らかに – aRaKaNoiD

+0

です。それは問題ではありませんでした。しかし、 'Locale current = getResources()。getConfiguration()。locale;'は現在のロケールの読み込みに使用できます。 –

関連する問題