From: <vl...@us...> - 2008-09-28 18:32:27
|
Revision: 393 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=393&view=rev Author: vladykx Date: 2008-09-28 18:32:15 +0000 (Sun, 28 Sep 2008) Log Message: ----------- All langs as array in config.ini Modified Paths: -------------- website/config/config.ini website/library/Application.php Modified: website/config/config.ini =================================================================== --- website/config/config.ini 2008-09-26 20:22:27 UTC (rev 392) +++ website/config/config.ini 2008-09-28 18:32:15 UTC (rev 393) @@ -8,7 +8,7 @@ truncate.length = "300" truncate.ending = "..." -truncate.exact' = "0" +truncate.exact = "0" truncate.considerHtml = "1" table.perpage = "10" @@ -29,6 +29,8 @@ lang.path = "lang/"; lang.default = "uk"; +lang.langs[] = "uk"; +lang.langs[] = "en"; title = "ACM Contester" titlesep = " - " @@ -36,8 +38,11 @@ [development: general] db.adapter = "Mysqli" +db.params.host = "localhost" db.params.dbname = "acm" db.params.username = "acm" db.params.password = "c0nt3st3r" +db.params.profiler.enabled = true +db.params.profiler.class = Zend_Db_Profiler_Firebug [stable: genral] \ No newline at end of file Modified: website/library/Application.php =================================================================== --- website/library/Application.php 2008-09-26 20:22:27 UTC (rev 392) +++ website/library/Application.php 2008-09-28 18:32:15 UTC (rev 393) @@ -204,7 +204,11 @@ $_db = Zend_Registry::get('db'); $translate = new Zend_Translate('csv', $this->_docroot.'/'.$_config->lang->path . $_config->lang->default . '.csv', $_config->lang->default); - $translate->addTranslation($this->_docroot.'/'.$_config->lang->path . 'en.csv', 'en'); + foreach($_config->lang->langs as $lang) + { + if ($lang != $_config->lang->default) + $translate->addTranslation($this->_docroot.'/'.$_config->lang->path . $lang .'.csv', 'en'); + } $translate->setLocale($_config->lang->default); Zend_Registry::set('Zend_Translate', $translate); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |