3 |
// $Id$ |
// $Id$ |
4 |
// ------------------------------------------------------------------------- |
// ------------------------------------------------------------------------- |
5 |
// $Log$ |
// $Log$ |
6 |
|
// Revision 1.6 2002/12/22 14:20:08 joko |
7 |
|
// + comment |
8 |
|
// |
9 |
|
// Revision 1.5 2002/12/19 10:26:25 jonen |
10 |
|
// + set_locale on 'lt_init()' according to choosen languange |
11 |
|
// |
12 |
// Revision 1.4 2002/12/19 06:19:31 joko |
// Revision 1.4 2002/12/19 06:19:31 joko |
13 |
// + function _init_database |
// + function _init_database |
14 |
// + function _init_smarty |
// + function _init_smarty |
161 |
$args = array( class_names => array('LocaleText'), ref_names => array('lt'), parent_name => 'site', run => 'start' ); |
$args = array( class_names => array('LocaleText'), ref_names => array('lt'), parent_name => 'site', run => 'start' ); |
162 |
$this->_mkEmbeddedObjects( $args ); |
$this->_mkEmbeddedObjects( $args ); |
163 |
|
|
164 |
|
// Set locale according to choosed language (needed for date/time functions) |
165 |
|
// TODO: set this according to user's profile |
166 |
|
// TODO: make an flib/Application/l10n/Locale.php from this (available by doing e.g. an '$locale_key = $app->l10n->getLocaleKey()') |
167 |
|
// TODO: don't wire this to the locale-text setting |
168 |
|
// ---> actually wire the locale-text setting to $app->l10n->getLocaleKey() (the other way round....) |
169 |
|
$langkey = $this->localetext->getCurrentLanguage(); |
170 |
|
if($langkey == "de") { |
171 |
|
setlocale (LC_ALL, 'de_DE'); |
172 |
|
} |
173 |
|
elseif($langkey == "en") { |
174 |
|
setlocale (LC_ALL, 'en_US'); |
175 |
|
} |
176 |
|
elseif($langkey == "tr") { |
177 |
|
setlocale (LC_ALL, 'tr_TR'); |
178 |
|
} |
179 |
|
|
180 |
} |
} |
181 |
|
|
182 |
function _init_database() { |
function _init_database() { |