I am struggling for a long time with DOJO Localization.
My application folder structure is in following way.

And, the code to get localized strings is as follows.
dojo.require("dojo.i18n");
dojo.requireLocalization("CTop.recordings", "agent");
dojo.addOnLoad(function () {
//Returns a localized Object
var localizedStrings = dojo.i18n.getLocalization("CTop.recordings", "agent", "de");
I am getting empty localizedStrings object.
If i move recordings folder to the level of dojo folder (i.e. under Scripts), the following code is working fine.
dojo.require("dojo.i18n");
dojo.requireLocalization("recordings", "agent");
dojo.addOnLoad(function () {
//Returns a localized Object
var localizedStrings = dojo.i18n.getLocalization("recordings", "agent", "de");
What’s the problem with adding CTop folder to structure? How to register the localization path?
I tried in following ways too but not succeeded.
dojo.require("dojo.i18n");
dojo.registerModulePath("myApp", "cTop.recordings.agent");
dojo.requireLocalization("myApp", "agent");
var localizedStrings = dojo.i18n.getLocalization("myApp", "agent", "de");
Please guide me resolving this
Thanks in advance.
The problem was i have two folders with the same name CTop. Renamed the folder which does not need localization. Following code snippet is enough to localize.