0

How to translate the applications strings of the native iOS controls. I have gone through the WorkLight Enabling Translation documentation. But I don't find any document related to the native controls.I have created a hybrid worklight app which contains both web and native screens. Using Cordova plugin, I have added native functionality to hybrid application.I am able to get the translation of the application strings (buttons/label/text in html page) using

    Messages.header or Messages.sampleText.

Likewise I need to translate the application strings of the native ios components such as button name,Label,text etc.

Is it possible to enable translation the native controls such as button name label/text of my iphone application using WorkLight ?

1 Answers1

0

It'd really help if you will mention your Worklight version...

Assuming you are using Worklight 6.1, take a look at your iphone\native\Resources\localization.bundle folder. You will find a running list of localization folders.

I believe there you will be able to add your additional strings.
The way to use it, is IMO just as you would in any other native iOS app... follow the standard practices for localization in iOS to accomplish it.

Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • Worklight version 6.1 – user2885848 May 20 '14 at 19:16
  • Thanks. See my answer how to add your strings. As for how to localize in the native part of your app, see Apple documentation or other questions in stack (like in the link I provided). – Idan Adar May 20 '14 at 19:19
  • You are asking about a native component inside your Hybrid app. For that you must use native code; if you think I did not understand your question, edit it and provide visual explanation of what you are trying to translate. – Idan Adar May 20 '14 at 19:29
  • Thanks Idan. say I have a view, in that I have created a button called "Submit" and Label.text = @"Save" programmatically and I need to translate the "Submit" and @"Save" values according to the device language/locale.(eg : English to Japanese). Is this possible using Worklight ? – user2885848 May 20 '14 at 19:39
  • Again, this is Not related to Worklight. Find or create a Japanese localiztion folder alongside the existing ones in the location I mentioned in my answer. Add your localized string there and invoke it using the standard localization method in iOS, in your native code. – Idan Adar May 20 '14 at 19:41
  • So you mean to say Worklight Enabling Translation/Multi-Language Translation concept is meant for only web app and for Native app we have to follow the localization method in iOS... Am I right ? – user2885848 May 20 '14 at 19:57
  • Yes, this is how I see it. It makes sense to me. – Idan Adar May 20 '14 at 19:57