From Fedora Project Wiki
(Created page with '{{header|docs}} <html> <head> <script type="text/javascript" language="JavaScript1.2"> if (navigator.appName == 'Netscape') var lang = navigator.language; ...') |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{header|docs}} | {{header|docs}} | ||
= Example index.html file for Release Notes = | |||
<html> | <html> | ||
Line 53: | Line 55: | ||
</body> | </body> | ||
</html> | </html> | ||
[[Category:Docs Project]] |
Latest revision as of 13:28, 3 December 2009
Example index.html file for Release Notes
<html> <head> <script type="text/javascript" language="JavaScript1.2"> if (navigator.appName == 'Netscape') var lang = navigator.language; else var lang = navigator.browserLanguage; </script> <title>Fedora 12 Release Notes</title> <body> <script type="text/javascript"> var match = 0; var locales = ["es-ES", "nl-NL", "cs-CZ", "pl=PL", "pt-BR", "ru-RU", "sv-SE"]; // Try for full match of lang_LOC for(locale in locales) { if(lang == locales[locale]) { match = 1; break; } } // Else try for match of lang if(match == 0) { for(locale in locales) { var loc_lang = locales[locale].substring(0,2); var language = lang.substring(0,2); if(loc_lang == language) { lang = locales[locale]; match = 1; break; } } } // Else default to en-US if(match == 0) { lang = 'en-US'; } window.location = lang + "/index.html"; </script> </body> </html>