Skip to content Skip to sidebar Skip to footer

Ibm Worklight - How To Change The Default "worklight Settings" String?

Is there a way to change the default 'Worklight Settings' string in Android's OptionsMenu, as provided by Worklight?

Solution 1:

Update: corrected the answer a bit...

Yes.

  1. Open yourApp.js (located at yourProject\apps\yourApp\common)
  2. Add the following object before wlCommonInit():

    WL.ClientMessages.wlSettings = "הגדרות וורקלייט";
  3. (Re-)Build and deploy, launch in Android emulator or device

Worklight Settings will now look like so when translated to Hebrew:

enter image description here

Some notes:

  • Make sure to change the Eclipse workspace encoding to "UTF-8" (in Eclipse Preferences > Workspace > Text file encoding). You will need to create a new Worklight project afterwards.
  • If you add android:targetSdkVersion="10" or above to the application's AndroidManifest.xml, the OptionsMenu will not display as Google switched in this API Level to ActionBar, which is not yet available in Worklight.
  • And a quick FYI to make sure you are aware that this feature is not meant for end-user consumption once moving to Production (it can fit for in-house apps to employees, but not your regular end-users; You don't want them to change the Worklight Server URL... ;).
  • To better familiarize with Worklight, please go through the IBM Worklight Getting Started training modules.

Post a Comment for "Ibm Worklight - How To Change The Default "worklight Settings" String?"