Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How localise the key UIApplicationShortcutItemTitle

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?

like image 601
Luca Bartoletti Avatar asked Sep 14 '15 16:09

Luca Bartoletti


1 Answers

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.

like image 95
Eric Juta Avatar answered Nov 15 '22 03:11

Eric Juta