I have a single-page application that does not hold any state at the server side. Can I switch locale (and have all the widgets re-rendered according to the new locale) without having to reload the page (which would make me lose the current state)?
i18n
I18N: is it possible to change locale without reloading the page?
- Login or register to post comments
- Subscribe post
i18n problems with custom build
I am getting errors on page load when trying to use a custom build of some Dijits with some of my own widgets.
First I get a 404:
GET http://servername/dojo-1.1.1/release/admin/dojo/nls/_en-us.js
Then
Could not load 'dojo.nls._en-us'; last tried './nls/_en-us.js'
I can work around this by copying my "dojo-1.1.1/releases/admin/nls/admin_dojo_en-us.js" to "dojo-1.1.1/releases/admin/dojo/nls/_en-us.js" but it's certainly not a solution.
---
My dojo-1.1.1 directory looks like this:
dojo-1.1.1/
Language translations for dijits
I need to support a wide range of locales for the Editor and DateTextBox dijits -- some of which are not included in the standard set of pre-built Dojo locales. I tried to build my own by downloading a source installation of Dojo 1.1.1 and then using Ant to run the build.xml file that is located in util\buildscripts\cldr (without any parameters -- I simply typed "ant" to get the full set). After doing this, I ended up with 182 locale folders in my dojo\cldr\nls directory -- which is great.
- Login or register to post comments
- Read more
- Subscribe post
Internationalization first steps
I've recently started looking into internationalizing a few custom dijits I've developed and thought I'd ask the community for some feedback on some of the ideas I'm playing with. First of all, let me give you an idea of my custom dijit I'm trying to internationalize:
dojo.provide("my.class.Nav");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.declare(
"my.class.Nav",
[dijit._Widget, dijit._Templated],
{
templatePath: dojo.moduleUrl("my.class", "templates/Nav.html"),
postCreate: function() {
Problems Loading Bundles in Custom Build
I'm trying to do a custom build with compression. The build completes successfully, but my app is not able to find bundles loaded through getLocalization. It appears that the requireLocalization calls are having trouble with the module names. The documentation for the custom build implies that the resource bundles are embedded into the compressed Javascript file, but that isn't happening in my case. Is there something I need to do to enable the bundles to be pulled in? Can I specify them in the profile file somehow? Here's an example of the kind of failure I'm seeing, from Firebug:
i18n, nls cldr strings, how to add new locale support
I noticed that the shipped dojo has a limit number of locales support in the cldr nls. I want to add more and found some instruction on the tutorial.
I want to know does the dojo svn source code have most of locale strings I need? do I need to to download the xml format file in the unicode.org site or the buildscript will connect to the site and do the download and transform action automatically ?
I also watched the http://trac.dojotoolkit.org/browser svn page, but not found any other locale strings besides the en, zh common ones.
Problem with i18n tutorial
I tried the i18n tutorial (http://dojotoolkit.org/node/4578) and I was able to get the English to load as default but when I tried to force the secondary language (I tried with the sw-chef and also de) I received the following error via firebug:
[Exception... "'Error: Bundle not found: gregorian in dojo.cldr , locale=de' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "" data: no]
and no localized strings load. It appears that all of the "xyz".js files are loading properly.
