Get button text from predefined locale : I18N Locale « Dojo toolkit « JavaScript Tutorial






<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>








29.41.I18N Locale
29.41.1.Get button text from predefined locale
29.41.2.Calendar in Chinese
29.41.3.Load predefined locale