Konstantin patch
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 27 Dec 2001 10:03:38 +0000 (10:03 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 27 Dec 2001 10:03:38 +0000 (10:03 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1975 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/help.php

index 155d184..3059a9f 100644 (file)
@@ -121,6 +121,26 @@ require_once('../functions/array.php');
 
    if (!$squirrelmail_language)
       $squirrelmail_language = "en";
+      /** 
+       * This harebrained solution is here because it produces the
+       * smallest patchfile.
+       * The real solution would be to either:
+       * a) move all locales into full-name locale names, like they
+       * really should be according to the ISO docs (e.g. en -> en_US, 
+       * es -> es_ES, ru -> ru_RU), since it's standard to have a language
+       * name + undescore + country name. 
+       * b) Provide a $languages['ru_RU']['HELPALIAS'] = 'ru';
+       *
+       * Konstantin Riabitsev
+       */
+      global $languages;
+      while (list($key, $val) = each($languages)){
+       if ($val['ALIAS'] == $squirrelmail_language){
+               $squirrelmail_language = $key;
+           break;
+      }
+   }
+   
 
    if (file_exists("../help/$squirrelmail_language")) {
       $help_exists = true;
@@ -208,4 +228,4 @@ require_once('../functions/array.php');
 ?>
 <tr><td bgcolor="<?php echo $color[0] ?>">&nbsp;</td></tr></table>
 <td></tr></table>
-</body></html>
+</body></html>
\ No newline at end of file