diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /intl/locale/tests/nsLocaleTest.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'intl/locale/tests/nsLocaleTest.html')
-rw-r--r-- | intl/locale/tests/nsLocaleTest.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/intl/locale/tests/nsLocaleTest.html b/intl/locale/tests/nsLocaleTest.html new file mode 100644 index 000000000..5b7aa415b --- /dev/null +++ b/intl/locale/tests/nsLocaleTest.html @@ -0,0 +1,44 @@ +<html> +<head> + <title>nsLocale Scriptability Test</title> + +</head> + +<script> + +var localeService = null; +var applicationLocale = null; +var systemLocale = null; + +function get_locale_service() { + localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"].createInstance(); + localeService = localeService.QueryInterface(Components.interfaces.nsILocaleService); + applicationLocale = localeService.GetApplicationLocale(); + systemLocale = localeService.GetSystemLocale(); +} + +function do_application_locale(t) { + t.value = applicationLocale.GetCategory("NSILOCALE_MESSAGES"); +} + +function do_system_locale(t) { + t.value = systemLocale.GetCategory("NSILOCALE_MESSAGES"); +} + +</script> + +<body BGCOLOR="#FFFFFF" TEXT="#000000" onLoad="get_locale_service();"> + +<form name="locale"> +<b>Application Locale: </b> +<input type="button" value="Get Application Locale" onClick=do_application_locale(this);></br> +<b>System Locale: </b> +<input type="button" value="Get System Locale" onClick=do_system_locale(this);></br> +</form> + +<hr> +<address><a href="mailto:tague@netscape.com">Tague Griffith</a></address> +</body> +</html> + + |