-
28 Aug 2011 9:17 PM #11
Ext.override can do this tood
Ext.override can do this tood
Ext.override(Ext.picker,{
'doneButton':'quewqeqewqewqewqeqwewqe',
'cancelButton':'canceladsfadsfafadsffads'
})
-
18 Apr 2012 8:08 AM #12
Uses of External Date Picker build with jquerry in sencha touch 2
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.
-
2 Jul 2012 5:43 AM #13
localization in sencha touch 2 (example)
localization in sencha touch 2 (example)
Hi!
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...):
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.Code:Ext.onReady(function() { Ext.Date.dayNames = [ 'Nedelja', 'Ponedeljek', 'Torek', 'Sreda', 'Četrtek', 'Petek', 'Sobota' ]; Ext.Date.monthNames = [ 'Januar', 'Februar', 'Marc', 'April', 'Maj', 'Junij', 'Julij', 'Avgust', 'September', 'Oktober', 'November', 'December' ]; 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', config:{ doneButton: 'Izberi' , cancelButton: 'Prekliči' } }); } if (Ext.picker.Date) { //debugger; Ext.define('Ext.picker.Date', { override: 'Ext.picker.Date', config:{ doneButton: 'Izberi' , cancelButton: 'Prekliči', dayText: 'Dan', monthText: 'Mesec', yearText: 'Leto', slotOrder: ['day', 'month', 'year'] } }); } if(Ext.IndexBar){ Ext.define('Ext.IndexBar', { override: 'Ext.IndexBar', config: { 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', 'Ž'] } }); } if(Ext.NestedList){ Ext.define('Ext.NestedList', { override: 'Ext.NestedList', config:{ backText: 'Nazaj', loadingText: 'Nalagam...', emptyText: 'Ni podatkov za prikaz' } }); } if(Ext.util.Format){ Ext.util.Format.defaultDateFormat = 'd.m.Y'; } if(Ext.MessageBox){ Ext.MessageBox.OK.text = 'V redu'; Ext.MessageBox.CANCEL.text = 'Prekliči'; Ext.MessageBox.YES.text = 'Da'; Ext.MessageBox.NO.text = 'Ne'; } });
Hopefully someone will find this useful.Code:<script type="text/javascript" src="/sencha-touch-2.0.1.1/sencha-touch-debug.js"></script> <script type="text/javascript" src="app.js"></script> <script type="text/javascript" src="locale/ext-lang-si.js"></script>
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.
-
14 Aug 2012 12:37 PM #14
localization in sencha touch 2 (example)
localization in sencha touch 2 (example)
Hello,
I have tried tine_m solution but my sencha touch 2.0 (2.0.1.1) is slightly different since I don´t 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 ?
-
15 Aug 2012 10:54 PM #15
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:
Code:{I hope that helps.Code:... "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": [ "img", "css", "locale", ], }
Similar Threads
-
Localization in Sench Touch
By Buckeye in forum Sencha Touch 1.x: DiscussionReplies: 1Last Post: 28 Aug 2011, 9:21 PM -
[DUPE-653] Touch 1.0.1 scrolls to end of page on simple touch.
By stevek in forum Sencha Touch 1.x: BugsReplies: 2Last Post: 23 Dec 2010, 3:45 PM -
Sencha Touch on iPhone v1 / iPod touch v1 ?
By palnap in forum Sencha Touch 1.x: DiscussionReplies: 4Last Post: 28 Oct 2010, 5:30 PM -
[FIXED-202] Error in sench/examples/geocongress
By efx in forum Sencha Touch 1.x: BugsReplies: 12Last Post: 8 Sep 2010, 1:25 PM


Reply With Quote