From: Brion Vibber Date: Thu, 27 Dec 2007 22:46:23 +0000 (+0000) Subject: Load additional local translation tables in constructor instead of in a function... X-Git-Tag: 1.31.0-rc.0~50252 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=4dd96b58aa24c412231fb0871d74bbd0f962654c;p=lhc%2Fweb%2Fwiklou.git Load additional local translation tables in constructor instead of in a function that's only called sometimes when cached data *isn't* available. Keeps things working and not spewing horrible errors everywhere when a caching system is available. --- diff --git a/languages/classes/LanguageKk.php b/languages/classes/LanguageKk.php index c88a8fbf72..9f43fe9a24 100644 --- a/languages/classes/LanguageKk.php +++ b/languages/classes/LanguageKk.php @@ -15,6 +15,20 @@ define( 'KK_L_LC', 'aäbcçdeéfgğhıiïjklmnñoöpqrsştuüvwxyýz' ); # Kazak define( 'KK_A', 'اٵبۆگعدەجزيكقلمنڭوٶپرستۋۇٷفحھچشىٸ' ); # Kazakh Arabic class KkConverter extends LanguageConverter { + + function __construct($langobj, $maincode, + $variants=array(), + $variantfallbacks=array(), + $markup=array(), + $flags = array()) { + parent::__construct( $langobj, $maincode, + $variants, $variantfallbacks, $markup, $flags ); + + // No point delaying this since they're in code. + // Waiting until loadDefaultTables() means they never get loaded + // when the tables themselves are loaded from cache. + $this->loadRegs(); + } function loadDefaultTables() { // require( dirname(__FILE__)."/../../includes/KkConversion.php" ); @@ -36,8 +50,6 @@ class KkConverter extends LanguageConverter { 'kk-cn' => new ReplacementArray( array_merge($kk2Arab, $kk2CN) ), 'kk' => new ReplacementArray() ); - - self::loadRegs(); } function postLoadTables() {