Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Core Labs / Archive / loading lang files

#1 2009-03-06 14:53
I think that we need to remake loading lang function.

Now it is like this:
if (file_exists($path_lang_alt))
{ require_once($path_lang_alt); }
elseif (file_exists($path_lang_def))
{ require_once($path_lang_def); }
I think better will be like this:
if (file_exists($path_lang_def))
{ require_once($path_lang_def); }
if (file_exists($path_lang_alt))
{ require_once($path_lang_alt); }

Reason in example:
-if user uses ua, ru or other (not english) language from old version of cotonti on new ones, lang will work not correctly. Some strings will be replaced with free space.

-after remaking^ it will load eng firstly and than user lang. What do you think about this? - мой маленький зарождающийся блог о котонти.
снижение стоимости программирования и снижение стоимости производства разные вещи. Первое можно скорее сравнить с раздачей работникам дешевых инструментов, чем со снижением зарплаты
#2 2009-03-07 20:44
I like the idea, despite the fact that it involves twice more includes. It's the price we have to pay for modularity.
May the Source be with you!
#3 2009-03-07 23:35
I think this is a good improvement, I often find missing language tags.