This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
if user chooses, in browser options language setttings, to put first a language that is one of those we translate for, and if user is not in that locale, when they browse to download page, the localized page is not shown; yet usual practice is that the language settings are followed. For IE I think there are vars that can be used to detect this from javascript code, for Firefox there is not and is related to general firefox problem of not showing translated page at all unless user is using localized firefox with useragent.locale pre set to that locale -- which is something that can be release noted. For the more typical case of user being in the locale that they want to see the translations, for IE, it does show the translated page for that locale.
As far as I see the language preference has no influence on any known JavaScript vars (navigator.language, navigator.userLanguage, navigator.browserLanguage, navigator.systemLanguage, navigator.userAgent) that can in theory contain lang preferences. If I understand it correctly, the language preferences are passed via Accept-Language in HTTP header. And as far as I know there is no way to get it using JavaScript. Jan, am I right? Is there any way to workaround this situation?
This might be might misunderstanding of navigator.userLanguage, navigator.browserLanguage, navigator.systemLanguage for IE - I had thought that one of those represented what user had chosen in browser options as preferred language; if not then I agree this part is not doable. But about user running non localized browser but in that locale, perhaps that can be gotten by one of above variables ? of course in either case or in case of user running localized IE in that locale, if the preferred language is not known, we are assuming they want to see download page in that language, even if it might not be true sometimes, that is, if they have preferred lang set to something else, but thats probably very small case. ken.frank@sun.com
Ken, > This might be might misunderstanding of navigator.userLanguage, navigator.browserLanguage, navigator.systemLanguage > for IE - I had thought that one of those represented what user had chosen in browser options as > preferred language; if not then I agree this part is not doable. Unfortunately none of those vars contain the prefered language information. > But about user running non localized browser but in that locale, > perhaps that can be gotten by one of above variables ? Actually it IS defined now by: 1) navigator.userLanguage or, if it is not set, 2) navigator.language > of course in either case or in case of user running localized IE in that locale, > if the preferred language is not known, we are assuming they want to see download > page in that language, even if it might not be true sometimes, that is, if they > have preferred lang set to something else, but thats probably very small case. You can check the values by saving the following code as .html file and opening it in the browser): <html><body> <script type="text/javascript">document.write('Lang = ' + navigator.language + '<br>');</script> <script type="text/javascript">document.write('User Lang = ' + navigator.userLanguage + '<br>');</script> <script type="text/javascript">document.write('Browser Lang = ' + navigator.browserLanguage + '<br>');</script> <script type="text/javascript">document.write('System Lang = ' + navigator.systemLanguage + '<br>');</script> </body></html> In my IE (IE is english itself, ru_RU is set in the regional settings, no matter what is set in the list prefered languages): Lang = undefined User Lang = ru Browser Lang = en-us System Lang = ru As the result, "ru" is used as the right language (in case we have "ru" translation...). So I see no issue here.
since none of those 3 navigator.* calls don't have the needed info, am closing this as wont fix (actually it can be fixed since we don't have access to server variables for this without asking user to confirm via a popup, nor can we run server side scripts to get this value. ken.frank@sun.com