小编eng*_*nar的帖子

Android中的俄语本地化

我的应用程序支持4种语言.用户选择他/她的语言.但我不能为俄罗斯做什么.

if (dil.equals("eng")){
        Configuration c = new Configuration(context.getResources().getConfiguration());
        c.locale = Locale.ENGLISH;
        context.getResources().updateConfiguration(c,context.getResources().getDisplayMetrics());

    }
    else if (dil.equals("ger")){
        Configuration c = new Configuration(context.getResources().getConfiguration());
        c.locale = Locale.GERMAN;
        context.getResources().updateConfiguration(c,context.getResources().getDisplayMetrics());

    }
    else if (dil.equals("rus")){
        Configuration c = new Configuration(context.getResources().getConfiguration());
        c.locale = Locale.????????;
        context.getResources().updateConfiguration(c,context.getResources().getDisplayMetrics());

    }
    else
    {
        Configuration c = new Configuration(context.getResources().getConfiguration());
        c.locale = Locale.getDefault();
        context.getResources().updateConfiguration(c,context.getResources().getDisplayMetrics());

    }
Run Code Online (Sandbox Code Playgroud)

我不懂俄语;

c.locale = Locale.????????;
Run Code Online (Sandbox Code Playgroud)

android localization

9
推荐指数
1
解决办法
9370
查看次数

标签 统计

android ×1

localization ×1