allow to use multiple locale directories
remove config options: - locale_dir - locale_dir_default add a config option: - locale_dirs - a list of directories with locale files (translations) We start reading locale from the first directory and files with the same name in each directory are concatenated.
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008-2024, Tomasz Sowa
|
||||
/*
|
||||
* Copyright (c) 2008-2026, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -678,10 +678,11 @@ void Templates::CreateFunctions()
|
||||
|
||||
void Templates::ReadLocale()
|
||||
{
|
||||
TemplatesFunctions::locale.SetDirectories(config->locale_dirs);
|
||||
TemplatesFunctions::locale.SetLocaleFiles(config->locale_files);
|
||||
TemplatesFunctions::locale.SetLocaleMaxId(config->locale_max_id);
|
||||
TemplatesFunctions::locale.SetDefLang(config->locale_default_id);
|
||||
TemplatesFunctions::locale.Read(config->locale_dir, config->locale_dir_default);
|
||||
TemplatesFunctions::locale.ReadLocales();
|
||||
|
||||
log << log3 << "Templates: there are " << TemplatesFunctions::locale.Size() << " locales" << logend;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user