Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > JavaScript > Re: TransModal ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 13 of 13 Topic 35494 of 37128
Post > Topic >>

Re: TransModal modal dialog project : beta testing

by VK <schools_ring@[EMAIL PROTECTED] > May 6, 2008 at 12:01 PM

On May 6, 1:25 pm, VK <schools_r...@[EMAIL PROTECTED]
> wrote:
>   /* It would be nice to have button labels on
>    * user's preferred language and not English
>    * only.
>    * navigator.userLanguage (IE) and
>    * navigator.language (some other UAs) values
>    * may have different meanings: OS language,
>    * or browser interface language, or the preferred
>    * language in the browser settings. Either way
>    * IMHO it still allows to make a good guess what
>    * language the current user would like to see.
>    * If the detected language is not implemented yet
>    * then English is used by default.
>    * For such basic lexicon as "Yes", "No", "Cancel" etc.
>    * we may disregard country-specific variations, so we
>    * are taking only two first letters from the language
>    * code -  so say "en", "en_US", "en_GB" will be "en".
>    *
>    *? Objections?
>    */
>
>   if ('userLanguage' in navigator) {
>    var lang = navigator.userLanguage.substring(0,2);
>   }
>   else if ('language' in navigator) {
>    var lang = navigator.language.substring(0,2);
>   }
>   else {
>    var lang = 'en';
>   }
>
>   TransModal.lang = (lang in TransModal.buttonLabelSet) ?
>                      lang : 'en';

I tried to find a resource with standard button labels in localized
Windows versions but no success. Anyone has one?
It also could be easily checked with IE installed via VBScript. Anyone
has time to match English labels to localized ones using provided
VBScript?

I am interested in any language of course, especially in French,
German and Spanish.

--------------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en-US">
<head>
<meta http-equiv="Content-type"
 content="text/html; charset=iso-8859-1">
<title>Label test</title>
<script type="text/vbscript">
</script>
</head>
<body>
<p>VBScript MsgBox labels' test</p>
<p>
 <button type="button"
  onclick='MsgBox "OK only", 0'
  >OK only</button>
 <button type="button"
  onclick='MsgBox "OK | Cancel", 1'
  >OK | Cancel</button>
 <button type="button"
  onclick='MsgBox "Abort | Retry | Ignore", 2'
  >Abort | Retry | Ignore</button>
 <button type="button"
  onclick='MsgBox "Yes | No | Cancel", 3'
  >Yes | No | Cancel</button>
</p>
</body>
</html>
 




 13 Posts in Topic:
TransModal modal dialog project : beta testing
VK <schools_ring@[EMAI  2008-05-06 02:25:41 
Re: TransModal modal dialog project : beta testing
Laser Lips <loudsphier  2008-05-06 05:32:40 
Re: TransModal modal dialog project : beta testing
VK <schools_ring@[EMAI  2008-05-06 05:49:44 
Re: TransModal modal dialog project : beta testing
Matthias Watermann <li  2008-05-06 16:01:49 
Re: TransModal modal dialog project : beta testing
Thomas 'PointedEars' Lahn  2008-05-06 23:07:10 
Re: TransModal modal dialog project : beta testing
Henry <rcornford@[EMAI  2008-05-06 08:17:21 
Re: TransModal modal dialog project : beta testing
Jorge <jorge@[EMAIL PR  2008-05-06 08:51:22 
Re: TransModal modal dialog project : beta testing
Jorge <jorge@[EMAIL PR  2008-05-06 08:55:04 
Re: TransModal modal dialog project : beta testing
VK <schools_ring@[EMAI  2008-05-06 10:55:57 
Re: TransModal modal dialog project : beta testing
VK <schools_ring@[EMAI  2008-05-06 11:20:13 
Re: TransModal modal dialog project : beta testing
Jorge <jorge@[EMAIL PR  2008-05-06 11:31:04 
Re: TransModal modal dialog project : beta testing
VK <schools_ring@[EMAI  2008-05-06 11:53:50 
Re: TransModal modal dialog project : beta testing
VK <schools_ring@[EMAI  2008-05-06 12:01:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 15:00:56 CDT 2008.