You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Load language packs from locale.ini instead of lang.php and locales.php #505
Today core includes two PHP files from every language folder. Replace them with one INI file read by parse_ini_file($file, false, INI_SCANNER_TYPED), which can't run code:
; web2project language packcode = "de_DE"; stored in user preferences and host_locale; must match ^[a-z]{2}_[A-Z]{2}$name = "German"; English namenative_name = "Deutsch"system_locale = "de_DE"; passed to setlocale() and the Gantt date localefirst_day = 1 ; 0 = Sunday ... 6 = Saturdaycore_version = "6.0"; core release whose strings this pack targets
loadLanguages() builds the same $LANGUAGES array from locale.ini, so setUserLocale(), findLanguage() and the language pickers don't change.
Charset is no longer per language: every pack is UTF-8, core passes <system_locale>.UTF-8 to setlocale(), and $locale_char_set stays set to utf-8 for the callers that read it.
LOCALE_TIME_FORMAT (and ru's LOCALE_DATE_FORMAT) is dropped; nothing reads it.
Validation when loading a pack: folder name matches ^[a-z]{2}(_[a-z]{2})?$; locale.ini parses; code matches its pattern; first_day is 0–6; names are non-empty and contain no markup. A pack that fails is left off the language list and the reason is logged. A folder with lang.php but no locale.ini is reported as "old format, not loaded". No .php file in a pack folder is ever included.
Activity