From 8a9990787e81d9fabb19dedcc29beeba003a9207 Mon Sep 17 00:00:00 2001 From: eldadfux Date: Sun, 6 Oct 2019 21:04:13 +0300 Subject: [PATCH] Updated locale settings --- CHANGES.md | 2 +- app/init.php | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3d8b3d7729..3f97b37063 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,7 @@ ## Planned Issues -* Added 7 new locales for locale service and email templates (af, cz, hu, lt, no, ru, si, sv, ta, vi, zh-cn, zh-tw) +* Added 7 new locales for locale service and email templates (af, ar, cz, hu, lt, no, ru, si, sv, ta, vi, zh-cn, zh-tw) * New users service routes to allow updates pref and name update * 2 stage Docker build * New database rule validation options diff --git a/app/init.php b/app/init.php index acc5f51cfa..43b8b0f68f 100644 --- a/app/init.php +++ b/app/init.php @@ -24,7 +24,7 @@ const APP_EMAIL_TEAM = 'team@'.APP_DOMAIN; const APP_EMAIL_SECURITY = 'security@'.APP_DOMAIN; const APP_USERAGENT = APP_NAME.'-Server/%s Please report abuse at '.APP_EMAIL_SECURITY; const APP_MODE_ADMIN = 'admin'; -const APP_LOCALES = ['ar', 'cat', 'de', 'en', 'es', 'fi', 'fr', 'gr', 'he', 'hi', 'id', 'it', 'nl', 'no', 'pt-br', 'pt-pt', 'ro', 'tr', 'ua', 'zh-cn', 'zh-tw']; +const APP_LOCALES = ['af', 'ar', 'cat', 'cz', 'de', 'en', 'es', 'fi', 'fr', 'gr', 'he', 'hi', 'hu', 'id', 'it', 'lt', 'nl', 'no', 'pl', 'pt-br', 'pt-pt', 'ro', 'ru', 'si', 'sv', 'ta', 'tr', 'ua', 'vi', 'zh-cn', 'zh-tw']; const APP_PAGING_LIMIT = 15; const APP_VERSION_STABLE = '0.2.0'; @@ -129,8 +129,10 @@ $locale = $request->getParam('locale', $request->getHeader('X-Appwrite-Locale', Locale::$exceptions = false; +Locale::setLanguage('af', include __DIR__.'/config/locale/af.php'); Locale::setLanguage('ar', include __DIR__.'/config/locale/ar.php'); Locale::setLanguage('cat', include __DIR__.'/config/locale/cat.php'); +Locale::setLanguage('cz', include __DIR__.'/config/locale/cz.php'); Locale::setLanguage('de', include __DIR__.'/config/locale/de.php'); Locale::setLanguage('en', include __DIR__.'/config/locale/en.php'); Locale::setLanguage('es', include __DIR__.'/config/locale/es.php'); @@ -139,17 +141,23 @@ Locale::setLanguage('fr', include __DIR__.'/config/locale/fr.php'); Locale::setLanguage('gr', include __DIR__.'/config/locale/gr.php'); Locale::setLanguage('he', include __DIR__.'/config/locale/he.php'); Locale::setLanguage('hi', include __DIR__.'/config/locale/hi.php'); +Locale::setLanguage('hu', include __DIR__.'/config/locale/hu.php'); Locale::setLanguage('id', include __DIR__.'/config/locale/id.php'); Locale::setLanguage('it', include __DIR__.'/config/locale/it.php'); +Locale::setLanguage('lt', include __DIR__.'/config/locale/lt.php'); Locale::setLanguage('nl', include __DIR__.'/config/locale/nl.php'); -//Locale::setLanguage('no', include __DIR__.'/config/locale/no.php'); +Locale::setLanguage('no', include __DIR__.'/config/locale/no.php'); +Locale::setLanguage('pl', include __DIR__.'/config/locale/pl.php'); Locale::setLanguage('pt-br', include __DIR__.'/config/locale/pt-br.php'); Locale::setLanguage('pt-pt', include __DIR__.'/config/locale/pt-pt.php'); Locale::setLanguage('ro', include __DIR__.'/config/locale/ro.php'); Locale::setLanguage('ru', include __DIR__ . '/config/locale/ru.php'); +Locale::setLanguage('si', include __DIR__ . '/config/locale/si.php'); +Locale::setLanguage('sv', include __DIR__ . '/config/locale/sv.php'); +Locale::setLanguage('ta', include __DIR__ . '/config/locale/ta.php'); Locale::setLanguage('tr', include __DIR__.'/config/locale/tr.php'); Locale::setLanguage('ua', include __DIR__.'/config/locale/ua.php'); -Locale::setLanguage('si', include __DIR__ . '/config/locale/si.php'); +Locale::setLanguage('vi', include __DIR__.'/config/locale/vi.php'); Locale::setLanguage('zh-cn', include __DIR__.'/config/locale/zh-cn.php'); Locale::setLanguage('zh-tw', include __DIR__.'/config/locale/zh-tw.php');