diff options
author | jimmacfx <jimmacfx@4fa712ea-3c06-0410-9261-c11b4c06c003> | 2005-11-25 22:38:23 +0000 |
---|---|---|
committer | jimmacfx <jimmacfx@4fa712ea-3c06-0410-9261-c11b4c06c003> | 2005-11-25 22:38:23 +0000 |
commit | 98da8161892e297930bc1386809456064abe5154 (patch) | |
tree | d69f0240dde86a16ddf28859696bf7be6617003c /www/inc/l10nget.inc.php | |
parent | f8469b7a50be618f9b2c3e031a2a9ab2ee3052aa (diff) | |
download | original-98da8161892e297930bc1386809456064abe5154.tar.gz original-98da8161892e297930bc1386809456064abe5154.tar.bz2 |
this is 0.11 actually
git-svn-id: https://forgesvn1.novell.com/svn/original/trunk@4 4fa712ea-3c06-0410-9261-c11b4c06c003
Diffstat (limited to 'www/inc/l10nget.inc.php')
-rw-r--r-- | www/inc/l10nget.inc.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/www/inc/l10nget.inc.php b/www/inc/l10nget.inc.php new file mode 100644 index 0000000..f04b18c --- /dev/null +++ b/www/inc/l10nget.inc.php @@ -0,0 +1,17 @@ +<?php + +function get_lang_from_agent($accept) { + + $acceptarr = explode("," , $accept); + foreach ($acceptarr as $lang) { + //get rid of trailing garbage + $lang = ereg_replace("^(.*)\;.*","\\1", $lang); + if (is_dir("l10n/$lang")) { + return $lang; + exit; + } + //no translation for accept language + return "en"; + } +} +?> |