mergExt - localizing app with mergSettings on iOS - ios

I'm localizing my iOS app and having difficulty translating strings in the mergSettings extension for LiveCode. I setup a new folder - ja.lproj. Then, I made a new file called "Localizable.strings" inside of that folder. I then created "key" = "value"; pairs. I loaded the app and the strings were not translated.
Any ideas on what to try next? Monte?

The settings bundle has it's own localized resources folders so ja.lproj needs to be inside Settings.bundle. Also I'm assuming when you loaded the app the locale was set to ja?
EDIT
The file should be named Root.strings

Related

Can I programmatically change the text of the Localizable.strings file? [duplicate]

I want to be able to update localized strings by code from the app. What I actually want to do is to make changes to the localization on a server and then let the iPhone application fetch updated localization strings from a server and then save them to the localizable.strings file.
You can't ! Those files are part of the bundle and can't be updated. You will have to setup the whole translation framework by yourself (which is not that much work) and implement caching using either core data or serialized dictionaries (one for each language I suppose).
You won't be able to modify the Localizable.strings file in your app bundle because the app bundle is read-only on iOS devices. To grab localized strings from a strings file in your app's Library directory, you could programmatically create a bundle at that location, put a Localizable.strings file in it and then grab the localized strings with NSLocalizedStringFromTableInBundle(). (I haven't tried this but it should work.)
There's service (Get Localization) that allows you to upload those .strings files to server and fetch them via API. However there's no client for iPhone yet but it would be quite simple to do. You can contribute one or then wait that there's official available.

How to dynamically load .strings files for localisation of UIStoryboard for multi lang support

Hi everyone i'm working on localisation part for my app with UIStoryboard, instead of creating the .strings file inside the app through Xcode .
I wanted to be load the .strings files from the server and use it for the uistoryboard for the localisation, i know the flow to be done using .xib by looking into this link
http://iosapplove.com/archive/2013/01/localizable-strings-how-to-load-translations-dynamically-and-use-it-inside-your-iphone-app/
same process i followed for loading in storyboards, i created a custom bundle in the Sandbox under that custom bundle i created a folder with name of the localisation lang as per the device language i.e if device language is set to espanol then folder name will be es.lproj inside that folder i'm saving the .string life .
when it comes to coding part
MainClassAppDelegate *_app = (MainClassAppDelegate *)[[UIApplication sharedApplication]delegate];
pwdTxtfld.placeholder = NSLocalizedStringFromTableInBundle(#"cut-iX-CM1.placeholder", nil,_app._languageBundle,nil);
but localising is not happening for the uitextfield placeholder, as i'm taking textfield object id and its type, when the app launches with espanol localisation the text field placeholder showing up with this text i'm passing through nslocalisedstring i.e
cut-iX-CM1.placeholder.
Some1 please help me out, where i'm going wrong., i dint enabled the storyboard for localisation , everything i'm doing it programatically.

Will Updating Your Application Save Over Your Users Previous Plist Files?

Future thinking here, if I was to create A .Plist files that saves data to my app to benefit users will this be overwritten if lets say I updated the app a few weeks later or am I fine to not worry. If not I was thinking maybe I could create the Plist programmatically to check if there is already a Plist created if this would be the way to go how would I go about creating a Plist programmatically?
Any other suggestions are welcome, thanks.
Documents directory will not be removed during an app update so your file will be there. However the app bundle will be replaced by the new bundle. But if your code copy the Plist from bundle to Document directory then it will be overwrite so you can put your logic for reading the data or updating the file!
Files released with the app are in the resources of the app bundle. These will be overwritten. But the user can't edit them anyway.
Usually you would copy whatever resources the user needed to edit / maintain from the app resources into the documents folder. Once they are there your code is in control (documents are not overwritten).

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 change the InfoPlist.strings's name

Now I have already have a localizable.strings. But when I want to change the app display name to localizable. The Application has localized display name can't find the string from localizable.string. Just when I change the name to InfoPlist.strings,It can works.But the text in application doesn't work. How to resgister the localizalbe.strings's name to the localized display name.
You'll find a useful guide on how to localize your Info.plist file, thus your application name (bundle display name) here.
EDIT after comment:
The InfoPlist.strings is the localisation file for your Info.plist file. You should not change its name.
It is used to localise only the strings inside your Info.plist file.
To localize other strings in your application, you will need another seperate Localizable.strings bundle.
So in your project you would have:
InfoPlist.strings
and
Localizable.strings
There are a number of other useful resources you can read here in relation to internationalization:
http://developer.apple.com/internationalization/

Resources