Reputation: 676
i have an app that will display some emojis and the correspondent name. i'm using kCFStringTransformToUnicodeName to get the name. but i want to localize the name like macOS, as you can see in the attached picture, macOS localize "Grinning Face" to "visage avec large sourire".
could you tell me how to localize these names and if there's no API, where can i found the localization files used by macOS. thank you.
Upvotes: 4
Views: 1461
Reputation: 6885
There is no api for this job. Unicode character name is standardized only in English.
The macOS use localization files to achieve this.
You can find the location of The CharacterPalette app:
Option+click on the Apple menu and choose ‘System Information’ (called ‘System Profiler’ in earlier releases of OS X).
From the side menu, look under ‘Software’ and choose “Applications”
My app's location looks like this:
Locate the CharacterPalette.app
,right click -> show package,you can find the localization files :
But I can't open it correctly , the file is full of unreadable code.Maybe it's encrypted.
You may have to copy paste the names one by one.
Upvotes: 2