具有Interface Builder用户定义的运行时属性的本地化字符串 [英] Localized String with Interface Builder User Defined Runtime Attributes

查看:90
本文介绍了具有Interface Builder用户定义的运行时属性的本地化字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试在故事板中创建本地化的accessibilityLabel(我试图避免以编程方式进行)。似乎每当我使用Localized String选项时,accessibilityLabels最终都被设置为我提供的本地化字符串键而不是字符串本身。有没有人有这个问题的解决方案?任何帮助将不胜感激。

I am currently trying to create a localized accessibilityLabel in the storyboard (I am trying to avoid doing it programatically). It seems that whenever I use the Localized String option, the accessibilityLabels ends up being set to the localized string key that I have provided rather than the string itself. Does anyone have the solution to this problem? Any help would be greatly appreciated.

推荐答案

我猜你期望本地化的字符串取自Localizable.strings。 Localized String类型不以这种方式工作,它只是一个标记,表示当您使用基本本地化时,用户定义的运行时属性的值将参与本地化过程。请查看 https://stackoverflow.com/a/24527990/2876231 以获得更长的解释。

I guess you expect the localized string to be taken from Localizable.strings. The "Localized String" type doesn't work this way, it's just a marker to indicate that the value of the user defined runtime attribute will participate in the localization process when you use base localization. Please take a look at https://stackoverflow.com/a/24527990/2876231 for a lengthier explanation.

这篇关于具有Interface Builder用户定义的运行时属性的本地化字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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