-
5 Apr 2012 6:34 AM #11
yup, did include all the loading and requiring settings. i slightly had to change the Ux.locale.Manager.setConfig({ and Ux.locale.Manager.init section:
this is my app.js:
well, in dev mode this works just fine like that...Code:Ext.Loader.setConfig({ enabled : true, paths : { Ux : 'Ux', 'Ext': 'sdk/src' } }); Ext.application({ name: 'myeasterapp', requires: [ 'Ux.locale.Manager', 'Ux.locale.override.st.Component', 'Ux.locale.override.st.Button', 'Ux.locale.override.st.Container', 'Ux.locale.override.st.TitleBar', 'Ux.locale.override.st.field.Field' ], views: [ 'Main', 'Contact', 'Status', 'Settings' ], models: [ 'Contact', 'Status' ], stores: [ 'Contacts', 'Status' ], phoneStartupScreen: 'resources/loading/Homescreen.jpg', tabletStartupScreen: 'resources/loading/Homescreen~ipad.jpg', launch: function() { // Initialize the main view Ext.Viewport.add(Ext.create('myeasterapp.view.Main')); Ux.locale.Manager.setConfig({ ajaxConfig : { method : 'GET' }, language : 'de', tpl : 'locales/{locale}.json', type : 'ajax' }); Ux.locale.Manager.init(); } });
-
9 Apr 2012 10:11 AM #12
is there a need to change the init and setConfig section?
well, i tried changing it, but the production biuld still doesnt work afterwards...
any further hints?
-
10 Apr 2012 12:43 AM #13
i took the ux.locale.manager complete example and built it pretty much unchanged into a production version.
same error there in the console:
where app.js is an exact copy of example index.js.Code:app.js:1 TypeError: 'null' is not an object (evaluating 'a.title')
it would be great if there is a way to get this language switch working in a productive built.
thanks heaps
-
10 Apr 2012 5:46 AM #14Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
@dishwashwebdesign I just pushed an update that includes an MVC example that you can use Sencha Command to build a production.
So if you go to st/mvc/ and run this:
It should build fine (did on my OSX 10.7) and when you launch the functionality should work with no issues.Code:sencha app build production
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
11 Apr 2012 7:08 AM #15
Mitchell, you are a legend. thanks heaps. it works smoothly like a swiss army knife

-
11 Apr 2012 8:50 AM #16Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
Fantastic! I did have to patch the overrides to get the locale for the build so there was a bug. Haven't looked into it much why the behavior changes but hope to have some time to do so soon. I had to get the locales from the initialConfig in the production version.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
15 Apr 2012 7:43 PM #17
Hi Mitchell,
im kidda new with sencha..is there any example for selectfields options usage?
-
16 Apr 2012 3:40 AM #18Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
Check out the example that comes with the Ux.local.Manager. All fields the placeHolder and label can be changed. The values in the selectfield are not handled as if you are using a store then it will display what the server returned.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
30 Apr 2012 12:42 AM #19
I'm not entirely sure how this is supposed to be implemented with Architect 2...
If I import all of the JS files then I need to add a listener for painted to do the replacing of locale text right?
Architect is winding me up massively, feels like I'm stuck inside a bubble of limitations
-
6 Jun 2012 5:01 PM #20
Hello,
another little concern i pumped into:
is type->jsonp supported in this release?
i got errors when building a productive built:
errors:Code:Ux.locale.Manager.setConfig({ ajaxConfig : { method : 'GET' }, language : currentLanguage, type: : "jsonp", tpl : '/locales/{locale}', });
any idea?Code:[INFO] Minifying resources/css/app.css [ERROR] Error: Command failed: [ERROR] 86:25:syntax error [ERROR] 87:25:syntax error [ERROR] 88:10:syntax error [ERROR] 1:0:Compilation produced 3 syntax errors. org.mozilla.javascript.EvaluatorException: Compilation produced 3 syntax errors. at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:154) at org.mozilla.javascript.Parser.parse(Parser.java:392) at org.mozilla.javascript.Parser.parse(Parser.java:337) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533) at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21) [ERROR]
thanks heaps...


Reply With Quote