ios: localize emoji name (kCFStringTransformToUnicodeName) - ios

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.

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.

Related

Can't choose "More" when choosing application language in Edit Scheme

I'm trying to account for both English and Georgian and an app I'm developing. I had added the localization language to the project, have all the storyboard languages setup and the strings files.
I now want to test to see if the text translates correctly.
However, when I go to Edit Scheme and find the application language drop down it doesn't have Georgian.
When I added the localization in the project settings I could go to a More menu that had LOADS of languages. Why does this not exist in the Application Language drop down in the scheme settings?
EDIT:
Tried the solution below by adding language and locale as arguments:
I have what I believe is the correct setup for translating strings depending on the language of the phone etc.
The Xcode scheme Debug options only include a subset of languages plus pseudolanguages for testing. However, there are workarounds.
If you want to see if text translates correctly, do one of the following:
Go to your scheme's Arguments tab and add the AppleLanguages and AppleLocale to the "Arguments Passed On Launch" section.
For example, to select the Georgian language and the Georgian region, you'd add:
-AppleLanguages "(ka-GE)"
-AppleLocale "GEO"
   or:
On the device or simulator, set the region and language in the device's Preferences and then run your app.
More here: Internationalization and Localization Guide
Note that the ISO language code for Georgia is "ka-GE", not "ge". You should have "ka-GE.lproj" as your localization folder name.
The language code comes from the ISO codes here: ISO 639-2 codes, and the region code comes from these: ISO_3166-2 codes
One other thing I just noticed is that your string translation files are called "Localize.strings". The default filename is "Localizable.strings" and if you're calling NSLocalizedString without providing an explicit file name in the optional table parameter, that's what iOS looks for. So, you'll probably need to rename your translation files for things to work.

Why might one need to set "supported document types" for an iOS or macOS build?

Documentation in XCode says the following:
You can configure your app to support different document types. You
can edit the document types setting in the Info pane for the target,
or by editing the information property list directly.
Go to CFBundleDocumentTypes in Information Property List Key Reference
for the possible values for the CFBundleTypeName (Name field),
LSItemContentTypes (Types field), CFBundleTypeRole, and other keys
that appear in the Info.plist file.
It does not however say what different document types are for, nor why you might want or need them.
What are they for, please?
Thank you for reading.
You specify which kind of documents your (document-based) App can open (read-only or read-write).
E.g. a word processor App might want to open .txt files for reading and writing and also offer the possibility to display .doc files.
The information you provide in the plist file is used by the OS to register your App in the Launch Services DB. I.e. double clicking a .txt file will then open your application with the document, Finder will show the provided icon, etc.

How can I add spaces to the app name

I'm trying to add spaces to my app name and even though my Bundle display name contains spaces they won't show up on the simulator.
Does anybody know how do achieve that?
Thank you very much
From iOS 11, if app name consists of more than 12 characters(smaller devices), OS will automatically remove spaces.
I don't see any workaround for that as of now.
Open .plist as SourceCode and then in xml format use   instead of space. You can find appname under xml tag "CFBundleDisplayName" or you can add this tag. e.g App name
Open project "Info".
Add a property "Bundle Display Name" into "Custom iOS Target
Properties". (as "Key")
Enter the display name, that will be shown on iPhone/iPad screen under
an app icon. (as "Value")
And also you should delete previously installed app and reinstall it.
Goto build settings, Under product name, set the desired name with spaces. It will work fine.
From the iOS 11 onwards, Please follow below ToDo I have did and worked well !!
Use this below string in your project which will give the perfect app name with proper single character space:
Demo App
The upper code is tested and verified in different environment setups and app name set in .xcconfig file.
You can also try with default config if it is working or not.
Note: You don't need to type otherwise it won't work, this will only work if you use my given string, so use it and modify only words, not the space.

Bahasa Melayu in iOS

I have an App whose target audience is based in Malaysia and can read and type in Malaysian Language. I have Localizable.strings file in Malaysian language.
There is an option in iOS for "Bahasa Melayu" in Language selection in Settings.app
I want to know which language should I select in Xcode so that my the device chooses the correct Localizable.strings file.
Any other details I should provide?
You have to use the abbreviation ms.lproj for the folder. I heard, all indonesian countries learn bahasa at school and I created also a folder with the same files inside a folder called id.lproj. Maybe you can tell me, if it's right that most people in Indonesia talk bahasa like a basic language.
The folders should look like this
If you insert the localization folder into your project it looks like this:

Change Single Language of Xcode Project

How do you change the default language used by your project without doing localization?
What if I want my app to be in Japanese or Italian? Is it enough to just use Japanese or Italian texts? How do I change the language displayed on iTunes to say that it's in Japanese or Italian?
Generally, the resources that you put in the main folder are assumed to be in the Default language, which is set in iTunes Connect when you add or edit the application. The setting is on the Application page and if it's not correctly set after adding it, click the Edit at the top of the page to be able to change it with the drop-down menu.
If you're going to localize at all, you'll want to make sure to change the localization native language, you'll need to change the key in the Info.plist corresponding to Localization native development region (a.k.a. CFBundleDevelopmentRegion in raw form) to match the language you are using for the raw files. The value of the tag should match the original localization language directory base (so en if you have an english lproj directory named en.lproj). This language will be used in the event that one of the other localizations is missing for the specific resource. Recommendations these days point to using the 2-letter version of the language (i.e. en instead of English, jp instead of Japanese, etc) as best-practice.
If you're building a Japanese-only app, you could just put all the resources in the top level. If you're going to have Japanese and any other language, you should put the language-specific Japanese resources in jp.lproj and set the CFBundleDevelopmentRegion to jp. Any unlocalized resources (standard images, etc.) can be stored in the main application folder.
By the way, same general rules in OS X as well, except that wherever I mentioned "main application folder" above, the files would be within the Resources folder.

Resources