CVS: phpweather languages.php,1.1,1.2 pw_utilities.php,1.7,1.8
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2004-02-11 14:12:27
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22354 Modified Files: languages.php pw_utilities.php Log Message: Added a British English translation from Nick Crossland (ncrossland), and reworked the object hiarachy to support dialects within a language. The idea is that pw_text_en_US contains the code and pw_text_en_GB extends this class to overrides a few strings. I've left a pw_text_en class that can be used as an alias for pw_text_en_US. The function get_languages in pw_utilities has been adjusted accordingly. Index: languages.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/languages.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- languages.php 17 Mar 2002 14:03:24 -0000 1.1 +++ languages.php 11 Feb 2004 14:08:16 -0000 1.2 @@ -24,7 +24,9 @@ 'de' => 'German', 'dz' => 'Bhutani', 'el' => 'Greek', - 'en' => 'English / American', + 'en' => 'English', + 'en_US' => 'American English', + 'en_GB' => 'British English', 'eo' => 'Esperanto', 'es' => 'Spanish', 'et' => 'Estonian', Index: pw_utilities.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/pw_utilities.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- pw_utilities.php 4 Sep 2002 21:04:41 -0000 1.7 +++ pw_utilities.php 11 Feb 2004 14:08:16 -0000 1.8 @@ -91,8 +91,8 @@ $dir = opendir(dirname(__FILE__) . '/output'); while($file = readdir($dir)) { - if (ereg("^pw_${type}_([a-z][a-z])\.php$", $file, $regs)) { - $output[$regs[1]] = $languages[$regs[1]]; + if (ereg("^pw_${type}_([a-z][a-z])(_[A-Z][A-Z])?\.php$", $file, $regs)) { + $output[$regs[1] . $regs[2]] = $languages[$regs[1] . $regs[2]]; } } closedir($dir); |