Load predefined locale : I18N Locale « Dojo toolkit « JavaScript DHTML






Load predefined locale

 
<html>
  <head>
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/"
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script language="JavaScript" type="text/javascript">
      dojo.require("dojo.i18n");
      dojo.requireLocalization("dijit", "common",dojo.i18n.normalizeLocale("fr"));
      alert(dojo.i18n.getLocalization("dijit", "common",dojo.i18n.normalizeLocale("fr")).buttonOk);
      alert(dojo.i18n.getLocalization("dijit", "common",dojo.i18n.normalizeLocale("fr")).buttonCancel);

      dojo.requireLocalization("dijit", "common",dojo.i18n.normalizeLocale("zh"));
      alert(dojo.i18n.getLocalization("dijit", "common",dojo.i18n.normalizeLocale("zh")).buttonOk);
      alert(dojo.i18n.getLocalization("dijit", "common",dojo.i18n.normalizeLocale("zh")).buttonCancel);

    </script>

  </head>

  <body></body>

</html>

   
  








Dojo-toolkit.zip( 3,849 k)

Related examples in the same category

1.Get button text from predefined locale
2.Calendar in Chinese