在“界面"构建器的UILabel中使用本地化的文本? [英] Using localized text in UILabel in Interface builder?

查看:46
本文介绍了在“界面"构建器的UILabel中使用本地化的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在接口构建器中直接使用字符串的本地化版本?还是我需要获取屏幕上每个标签的引用,然后手动使用 NSLocalizedString(...); ?

Is it possible to use the localized version of a string directly in the interface builder? Or do I need to obtain a reference to each label etc on the screen and then manually use NSLocalizedString(...);?

推荐答案

在实用工具"面板中的文件"检查器中,您将找到本地化"部分.您可以在那里添加语言.对于每种语言,Xcode都会为该语言创建一个XIB,因此您只需编辑每种XIB.

In the Utilities panel, in the File Inspector you will find the Localization section. You can add languages there. For each language, Xcode will create a XIB for that language, so you only have to edit each XIB.

这篇关于在“界面"构建器的UILabel中使用本地化的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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