Custom Keyboard Name without "KeyboardName - HostAppName" scheme - ios

I have small problem, I have changed Bundle Display Name in info.plist to "MyName", but unfortunately in Keyboard Choice Menu it still shows as "MyName — HostAppName". Is that possible to change something to show "MyName" only?
Thanks in advance! And yes I have searched through entire STO to find anything about that :)

I too was wondering how to achieve this, especially after Swiftkey was able to have a single name. To do this both the Bundle display name in both info.plist files must be the same.
The moment they are different then they will display with separated string.
I hope this helps.

You can do that by setting "Bundle Display Name" key with value "My Name" in both info.plist files
info.plist file in your keyboard target
info.plist file of you Application

Related

IOS 8 NSLocationAlwaysUsageDescription custom translation

I understood that I can have localized NSLocationAlwaysUsageDescription text using standard iOS localization mechanism.
Since we are using our custom dynamic localisation mechanism I wonder if there is another way to translate that string.
I thought of editing application info.plist file on app start, but it seems to be read only.
Can I change this value from withing the app?
There is a way. Add a new Strings file called "InfoPlist". Then localize it using a Localize button in attributes inspector and add localizations to the InfoPlist's keys. To localize CLLocation premission's description add in every version proper key and loacalised value.
//English file
"NSLocationAlwaysUsageDescription" = "English description";
_
//Polish file
"NSLocationAlwaysUsageDescription" = "Polski opis";
There's no way to use a custom localisation system with the info.plist strings.
That part of your app will have to use iOS's default localisation mechanism.
This is how to localise the location request description with iOS's built in strings file localisation system.
// English.strings file
"NSLocationAlwaysUsageDescription" = "English description";
// AnotherLanguage.strings
"NSLocationAlwaysUsageDescription" = "ajbdknfuied wibnrf";
EDIT: At everyone down voting me. The question asked about using a custom "custom localisation system". They explicitly said they did not want to use the built in localisation system, but instead their own custom one. That is why I said it was impossible.
Localising NSLocationAlwaysUsageDescription is completely possible. Using your own custom localisation system to do it is not.
I tried using the answers above, but had no luck until I used the information in this much more helpful thread.

Localization not working on Xcode

I can't get my app to work with localization.
I have created a Localizable.strings file and ticked the languages that I am localizing. (For now I have base, english and spanish.)
Localized storyboard with three languages.
In Project settings > Info I checked Use Base internationalization and all languages are correctly added. (Moreover, beside the language it shows 2 Files Localized, which I guess they must be the storyboard and .strings file.
I am using this example for testing:
self.loginLabel.text = NSLocalizedString(#"login", #"Login text info");
This is how the Localizable.strings (Base) file is looking like:
"login" = "Log in";
However, it is not working and instead it is showing login. Have I forgotten a key step?
BTW: I have tried already changing the login text just it case something was overriding the label.
Those are the steps indeed, I don't think you've left anything out. I usually set the comment to nil instead of another NSString though - not sure if that makes a difference.
However, rather than in only base, make sure you're adding the same line also to the English and Spanish files (obviously translated as appropriate).
Next, for the language to show up, set the device to said language. Close your app and start it again. Strings should now show up in the other language.
Note that the Simulator often has trouble with new translations, especially when they've been added to an already deployed app. In that case, remove the app from the Simulator, click on Product - Clean, and re-deploy.
In my case, it didn't work because the UILabel text was set as "Attributed" instead of "Plain" in the Attributes Inspector.
Localization with a .strings file doesn't seem to work on Attributed strings.
I even had a storyboard with mixed Plain and Attributed string labels, and the localization only worked on the Plain ones.
For anyone having a similar issue in the future:
Check if your *.strings file has any non-printed characters.
I used JavaScript for a simple task and didn't realize it included some whitespace characters.
An easy way to check is to put the translation at the top of the file and see if it works. If it does, there might be some whitespace characters. The next steps are... binary search and remove the whitespace characters.

Localization error of App in ios

I've followed all the desired steps to achieve localization of application.following are those steps:
create a Localizable.strings file.
add languages which we are looking to localized.
add these in localizable.strings using add localized button.
Now I'm getting following alert message :
fatal: index file smaller than expected"
along with this the Localizable.strings file is not appearing in the list which asks about the reference file and resource language.anybody please help me as soon as possible.
Thanks in Advance.
This seems to be like a git error which can be fixed by removing .git/index and then reset to HEAD.
You can find details here:
http://programertools.blogspot.com/2014/04/how-to-fix-fatal-index-file-smaller.html
You can follow this Localization link .
Hope this helps
The index file has become corrupted, but it is easily re-creatable. Just remove it, and re-add the files in your working directory:
rm .git/index
git add .

MainController.xib file required for every project?

Is a MainController.xib file required for every iOS project? Reason I ask is because I have started to work on some programs, and I noticed that with some of the defaults there is no MainController.xib file generated.
If it is not generated by the template, does this mean that I have to create one myself using "Add File?"
I have a vague recollection of reading somewhere that MainController.xib generated the first view when the program loads but am not sure if this is correct?
Thank you.
It's not required. As far as I know, none of the templates in Xcode 4.2 and 4.3 create a MainController.xib.
Your app's Info.plist can contain the “Main nib file base name” key. The raw key is NSMainNibFile, and it also shows up on the app's Summary screen as the “Main Interface” combo box.
If this key has the value MainController, then you need to have a nib named MainController. The app will automatically load this when it is launched. You can set the value of the key to something else if you want to name your main nib something else. (I usually name mine MainInterface.)
If you don't include this key in your Info.plist, then the app won't automatically load a nib when it is launched.
That looks like a default name generated by XCode. Depending on the project template, whatever the the .xib file is named, you get a controller to go with it.

How to localize the app name?

I wrote a game with cocos2d and translated all the image and text in the
game in two different language.
When the app launches, I load different resource according to the locale of
the device and this worked all OK.
Then when I upload this app for review, I first named it say "test".
Then in the localization part I add a language "Japanese".
But I found that in the "Japanese meta data part", I can edit a lot of
things except the "app name" which is "test". But I want my app to show
different names according to the locale of the device also.
Can somebody tell me how to get this work? Thanks in advance...
You can create a file called InfoPlist.strings in each of your language specific directories, and set a language specific value for CFBundleDisplayName.

Resources