Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For your own strings (not talking about native touch component) you could do something like this.</p> <p>1) In your index.html in the head section, load a LocaleManager.js file (whatever the name) before the </p> <p><code>&lt;script id="microloader" type="text/javascript" src="sdk/microloader/development.js"&gt;&lt;/script&gt;</code></p> <p>In your localeManager, depending on your browser's language load the resource file corresponding to your language (myStrings-fr.js | myStrings-en.js )</p> <p>You can do something like this to get the language in the browser: </p> <pre><code>window.navigator.language || window.navigator.userLanguage || window.navigator.browserLanguage || window.navigator.systemLanguage </code></pre> <p>2) Create your resources files with your translated string</p> <p>It should look like this for the english version (myStrings-en.js) :</p> <pre><code>var myStrings = { MyPackage1: { myString1: 'Seach...' }}; </code></pre> <p>It should look like this for the french version (myStrings-fr.js) for example :</p> <pre><code>var myStrings = { MyPackage1: { myString1: 'Recherchez...' }}; </code></pre> <p>3) In your sencha touch code, for example for a searchfield place holder value</p> <pre><code>xtype: 'searchfield', id: 'searchToolbarItem', placeHolder: myStrings.MyPackage1.myString1 </code></pre> <p>Hope it will help.</p> <p>Another solution could be to modify the build process of your sencha touch app and create localized versions of your app when building it. So there would be one version per language. Then depending on the brower language you would load the right version of your app when loading the app in the browser.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload