<small id='SAjFY'></small><noframes id='SAjFY'>

      <legend id='SAjFY'><style id='SAjFY'><dir id='SAjFY'><q id='SAjFY'></q></dir></style></legend>
    1. <tfoot id='SAjFY'></tfoot>
        <bdo id='SAjFY'></bdo><ul id='SAjFY'></ul>
      <i id='SAjFY'><tr id='SAjFY'><dt id='SAjFY'><q id='SAjFY'><span id='SAjFY'><b id='SAjFY'><form id='SAjFY'><ins id='SAjFY'></ins><ul id='SAjFY'></ul><sub id='SAjFY'></sub></form><legend id='SAjFY'></legend><bdo id='SAjFY'><pre id='SAjFY'><center id='SAjFY'></center></pre></bdo></b><th id='SAjFY'></th></span></q></dt></tr></i><div id='SAjFY'><tfoot id='SAjFY'></tfoot><dl id='SAjFY'><fieldset id='SAjFY'></fieldset></dl></div>

      如何在运行时更改 iPhone 应用程序语言?

      How to change iPhone app language during runtime?(如何在运行时更改 iPhone 应用程序语言?)

            <legend id='eUgFd'><style id='eUgFd'><dir id='eUgFd'><q id='eUgFd'></q></dir></style></legend>
            <i id='eUgFd'><tr id='eUgFd'><dt id='eUgFd'><q id='eUgFd'><span id='eUgFd'><b id='eUgFd'><form id='eUgFd'><ins id='eUgFd'></ins><ul id='eUgFd'></ul><sub id='eUgFd'></sub></form><legend id='eUgFd'></legend><bdo id='eUgFd'><pre id='eUgFd'><center id='eUgFd'></center></pre></bdo></b><th id='eUgFd'></th></span></q></dt></tr></i><div id='eUgFd'><tfoot id='eUgFd'></tfoot><dl id='eUgFd'><fieldset id='eUgFd'></fieldset></dl></div>
            <tfoot id='eUgFd'></tfoot>
          • <small id='eUgFd'></small><noframes id='eUgFd'>

                <tbody id='eUgFd'></tbody>
              • <bdo id='eUgFd'></bdo><ul id='eUgFd'></ul>

                本文介绍了如何在运行时更改 iPhone 应用程序语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                有没有办法在运行时更改应用程序语言?

                Is there a way to change the application language during runtime?

                因此,更改后 NSLocalizedString 立即返回新语言的字符串.

                So, after the change NSLocalizedString immediately returns the string for the new language.

                我现在正在做的是使用以下代码更改语言:

                What I'm doing now is changing the language using the code below:

                - (void)onChangeLanguage: (id)sender 
                {
                    NSArray *lang = [NSArray arrayWithObjects:((InfoWhatever *)sender).language, nil];
                    [[NSUserDefaults standardUserDefaults] setObject:lang forKey:@"AppleLanguages"];
                    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
                    NSArray *languages = [defaults objectForKey:@"AppleLanguages"];
                    NSString *currentLanguage = [languages objectAtIndex:0];
                
                    NSLog(@"Current language: %@", currentLanguage);
                }
                

                语言会改变,但只有在重新启动后应用程序.

                The language will change but only after restarting the app.

                推荐答案

                我怀疑你能做到这一点,即使设置应用程序也做不到.

                I doubt you can do this, even the Settings app cannot do it.

                (当你在设置应用中更改语言时,屏幕变黑,并显示设置语言..."和一个进度轮.经过漫长的等待,你回到了 Springboard.它几乎看起来像手机重新启动.)

                (When you change the language in the Settings app, the screen goes black, and displays "setting language..." and a progress wheel. After a long wait, you are back in Springboard. It almost looks like the phone reboots.)

                这篇关于如何在运行时更改 iPhone 应用程序语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)
                [ios.cocos2d+box2d]how to disable auto-rotation?([ios.cocos2d+box2d]如何禁用自动旋转?)
              • <i id='tpP9Y'><tr id='tpP9Y'><dt id='tpP9Y'><q id='tpP9Y'><span id='tpP9Y'><b id='tpP9Y'><form id='tpP9Y'><ins id='tpP9Y'></ins><ul id='tpP9Y'></ul><sub id='tpP9Y'></sub></form><legend id='tpP9Y'></legend><bdo id='tpP9Y'><pre id='tpP9Y'><center id='tpP9Y'></center></pre></bdo></b><th id='tpP9Y'></th></span></q></dt></tr></i><div id='tpP9Y'><tfoot id='tpP9Y'></tfoot><dl id='tpP9Y'><fieldset id='tpP9Y'></fieldset></dl></div>

                <small id='tpP9Y'></small><noframes id='tpP9Y'>

                  <bdo id='tpP9Y'></bdo><ul id='tpP9Y'></ul>
                      <tbody id='tpP9Y'></tbody>
                      <legend id='tpP9Y'><style id='tpP9Y'><dir id='tpP9Y'><q id='tpP9Y'></q></dir></style></legend>

                          <tfoot id='tpP9Y'></tfoot>