Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Localization in Sench Touch

  1. #11
    Sencha User
    Join Date
    Aug 2008

    Post Ext.override can do this tood



  2. #12

    Default Uses of External Date Picker build with jquerry in sencha touch 2

    Actually i want to make an application where an external jq date picker is to be insert in sencha touch. but i can't do it. can any one help me.

  3. #13
    Sencha User
    Join Date
    Feb 2012

    Default localization in sencha touch 2 (example)


    I was searching for that topic (for SENCHA TOUCH 2) on the internets for hours without any luck.. I wondered how to apply the JS file found in /src/locale/ to the sencha app, but whatever I did, the DatePicker did not get localized.

    Finnaly I found a solution, and maybe this will save some time to someone....
    again, this is solution for SENCHA TOUCH 2.0!

    1. I edited and translated the file /src/locale/ext-lang-en.js. I noticed that in this file, there was still depricated function "Ext.override" so that has to be fixed. And "Date" should be replaced with "Ext.Date". Also I put the whole script into a function in Ext.onReady event. Here is my final file (translated for Slovenian locale, but you will get the point...):
    Ext.onReady(function() {
    	Ext.Date.dayNames = [
    	Ext.Date.monthNames = [
    	Ext.Date.monthNumbers = {
    		'Jan': 0,
    		'Feb': 1,
    		'Mar': 2,
    		'Apr': 3,
    		'Maj': 4,
    		'Jun': 5,
    		'Jul': 6,
    		'Avg': 7,
    		'Sep': 8,
    		'Okt': 9,
    		'Nov': 10,
    		'Dec': 11
    	Ext.Date.getShortMonthName = function(month) {
    		return Date.monthNames[month].substring(0, 3);
    	Ext.Date.getShortDayName = function(day) {
    		return Date.dayNames[day].substring(0, 3);
    	Ext.Date.getMonthNumber = function(name) {
    	  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
    	Ext.Date.parseCodes.S.s = '(?:st|nd|rd|th)';
    	if (Ext.picker.Picker){
    		Ext.define('Ext.picker.Picker', {
    			override: 'Ext.picker.Picker',
    				doneButton: 'Izberi' ,
    				cancelButton: 'Prekli?i'
    	if (Ext.picker.Date) {
    		Ext.define('Ext.picker.Date', {
    			override: 'Ext.picker.Date',
    				doneButton: 'Izberi' ,
    				cancelButton: 'Prekli?i',
    				dayText: 'Dan',
    				monthText: 'Mesec',
    				yearText: 'Leto',
    				slotOrder: ['day', 'month', 'year']   
    		Ext.define('Ext.IndexBar', {
    			override: 'Ext.IndexBar',
    				letters: ['A', 'B', 'C', '?', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', '', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '']
    		Ext.define('Ext.NestedList', {
    			override: 'Ext.NestedList',
    				backText: 'Nazaj',
    				loadingText: 'Nalagam...',
    				emptyText: 'Ni podatkov za prikaz'
    		Ext.util.Format.defaultDateFormat = 'd.m.Y';
    		Ext.MessageBox.OK.text = 'V redu';
    		Ext.MessageBox.CANCEL.text = 'Prekli?i';
    		Ext.MessageBox.YES.text = 'Da';
    		Ext.MessageBox.NO.text = 'Ne';
    2.) I saved the file to <app_dir>/locale/ext-lang-si.js. In my index.html I added the line AFTER app.js script and that was it.
    <script type="text/javascript" src="/sencha-touch-"></script>
        <script type="text/javascript" src="app.js"></script>
        <script type="text/javascript" src="locale/ext-lang-si.js"></script>
    Hopefully someone will find this useful.

    P.S.: I have probably misplaced this thread, but this is where google directed me most of the times, and I believe that so will do for others... sorry for inconvenience.

  4. #14
    Sencha User
    Join Date
    Aug 2012

    Default localization in sencha touch 2 (example)


    I have tried tine_m solution but my sencha touch 2.0 ( is slightly different since I dont have
    any reference to app.js in the index.html and I load microloader/development.js.
    The solution does not work for me

    Any Clue ?

  5. #15
    Sencha User
    Join Date
    Feb 2012


    If you use microloader, then make sure that you put localization script (for example "locale/ext-lang-si.js") into your app.json like this:

    "js": [
                "path": "sdk/sencha-touch.js"
                "path": "app.js",
                "bundle": true,
                "update": "delta"
                "path": "locale/ext-lang-si.js",
                "update": "delta"  
         * Extra resources to be copied along when build
        "resources": [
    I hope that helps.

  6. #16
    Sencha User
    Join Date
    Oct 2012

    Default Brillant !

    This worked for me in ST 2.1 too, so thanks !

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Localization in Sench Touch
    By Buckeye in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 28 Aug 2011, 9:21 PM
  2. [DUPE-653] Touch 1.0.1 scrolls to end of page on simple touch.
    By stevek in forum Sencha Touch 1.x: Bugs
    Replies: 2
    Last Post: 23 Dec 2010, 3:45 PM
  3. Sencha Touch on iPhone v1 / iPod touch v1 ?
    By palnap in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 28 Oct 2010, 5:30 PM
  4. [FIXED-202] Error in sench/examples/geocongress
    By efx in forum Sencha Touch 1.x: Bugs
    Replies: 12
    Last Post: 8 Sep 2010, 1:25 PM
  5. Localization and JSB
    By Rob_mac in forum Sencha Ext JS Q&A
    Replies: 6
    Last Post: 30 Nov 2007, 2:55 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts