1. #1
    Sencha User
    Join Date
    Oct 2009
    Location
    rome - italy
    Posts
    38
    Vote Rating
    0
    strad84 is on a distinguished road

      0  

    Default Answered: Datepicker change language

    Answered: Datepicker change language


    Hi guys, i'm trying to change the datepicker languange from english to italian and i'm using Sencha Touch 1.1.1 .
    I put the file path into the index "src/locale/ext-lang-it.js" but nothing change.
    Can anyone help me?!

    Thanks a lot


  2. Ciao strad84.
    First, you need to create a new .js file called, as you correctly said, "ext-lang-it.js".
    In this file you have to put what follows:

    Code:
    //Translating the months names
    Date.monthNames = [
        "Gennaio", "Febbraio", "Marzo",
        "Aprile", "Maggio", "Giugno",
        "Luglio", "Agosto", "Settembre",
        "Ottobre", "Novembre", "Dicembre"
    ];
    
    
    //Translating he DatePicker component labels
    if(Ext.DatePicker) {
    
    
    	Ext.apply(Ext.DatePicker.prototype, {
    		dayText		: 'Giorno',
    		monthText	: 'Mese',
    		yearText	        : 'Anno'
    	});
    	
    }
    Finally you need to include this file in your "index.html".
    If you run this simple application, you will see that everything has been translated now

    Code:
    Ext.setup({
        onReady: function() {
    
    
    		var datePicker = new Ext.DatePicker();
    		datePicker.show();
    		
        }
    });
    Hope this helps.

  3. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    23
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Ciao strad84.
    First, you need to create a new .js file called, as you correctly said, "ext-lang-it.js".
    In this file you have to put what follows:

    Code:
    //Translating the months names
    Date.monthNames = [
        "Gennaio", "Febbraio", "Marzo",
        "Aprile", "Maggio", "Giugno",
        "Luglio", "Agosto", "Settembre",
        "Ottobre", "Novembre", "Dicembre"
    ];
    
    
    //Translating he DatePicker component labels
    if(Ext.DatePicker) {
    
    
    	Ext.apply(Ext.DatePicker.prototype, {
    		dayText		: 'Giorno',
    		monthText	: 'Mese',
    		yearText	        : 'Anno'
    	});
    	
    }
    Finally you need to include this file in your "index.html".
    If you run this simple application, you will see that everything has been translated now

    Code:
    Ext.setup({
        onReady: function() {
    
    
    		var datePicker = new Ext.DatePicker();
    		datePicker.show();
    		
        }
    });
    Hope this helps.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  4. #3
    Sencha User
    Join Date
    Oct 2009
    Location
    rome - italy
    Posts
    38
    Vote Rating
    0
    strad84 is on a distinguished road

      0  

    Default


    Grazie per la dritta Andrea !

    Thank you !

  5. #4
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    23
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Di nulla
    Please don't forget to set the question as answered if this solve your problem.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  6. #5
    Sencha User
    Join Date
    May 2013
    Location
    Rovereto
    Posts
    7
    Vote Rating
    0
    emanuele.vendra is on a distinguished road

      0  

    Default


    Hi, I use Sencha Touch 2.1.1 but it doesn't work for me!
    I've got not error.
    Any solution?