iOS8区域本地化(例如pt-BR)? [英] iOS8 Regional Localization (e.g. pt-BR)?

查看:100
本文介绍了iOS8区域本地化(例如pt-BR)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我的理解,iOS8现在支持区域本地化(在这种情况下我想支持pt-BR)。

From what I understand, iOS8 now supports regional localisations (in this case I want to support pt-BR).

参见 http://www.ibabbleon.com/iOS-Language-Codes-ISO-639.html

我遇到了这方面的问题,使用全新的单一视图应用程序对其进行测试,在xcode中我已将pt和pt-BR语言添加到我的项目中,并且已更改相应的文本在pt.lproj和pt-BR.lproj目录中。

I am having problems with this, testing this with a brand new single view application, in xcode I have added the pt and pt-BR languages to my project, and altered text accordingly in the pt.lproj and pt-BR.lproj directories.

将我的设备设置为pt-BR并运行后,显示的文本始终为pt,而不是pt -BR根据需要。

After setting my device to pt-BR and running, the text displayed is always pt, not pt-BR as desired.

确实记录了NSLocale返回的首选语言环境

Indeed logging the preferred locale returned by NSLocale

NSString *language = [[NSLocale preferredLanguages] objectAtIndex:0];
NSLog(@"Locale = %@", language);

仅返回'Locale = pt'...

Returns only 'Locale = pt'...

我是否遗漏了任何步骤,或者这是iOS8中的错误?

Am I missing any steps or is this a bug in iOS8?

感谢您的帮助......

Thanks for any help...

推荐答案

出于某种原因,iOS8使用 pt 用于葡萄牙语巴西(而不是 pt_BR )。当您选择葡萄牙葡萄牙时,本地化将为 pt_PT

For some reason, iOS8 is using pt for Portuguese Brasil (instead of pt_BR). When you select Portuguese Portugal, the localization will be pt_PT

我已删除本地化,并添加了通用葡萄牙语(用旧的.strings文件替换)。

I've deleted the localization, and added the generic portuguese (and replaced with .strings files with the old ones).

这篇关于iOS8区域本地化(例如pt-BR)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆