How localise the key UIApplicationShortcutItemTitle

做~自己de王妃 提交于 2019-12-22 05:02:52

问题


How should I localise the key UIApplicationShortcutItemTitle?

I know how localisation works for keys like NSLocationUsageDescription and NSLocationAlwaysUsageDescription: you put your localisation in the InfoPlist.strings file.

However, those are unique keys at the route of the document.

In this case, I'll have one UIApplicationShortcutItemTitle for each quick action, nested inside a dictionary and and array.

How can I localise these nested values?


回答1:


Despite UIApplicationShortcutItemTitle not being 'unique' because there are multiple arrays, you can specify the value of that key to link up to the key in InfoPlist.strings.

In Info.plist,

"UIApplicationShortcutItemTitle" : "shortcutTitle1"

In InfoPlist.strings,

shortcutTitle1 = "localised string value goes here for the first shortcut title in the info plist array"

Taken from Apple's sample application example.



来源:https://stackoverflow.com/questions/32569705/how-localise-the-key-uiapplicationshortcutitemtitle

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!