From 09012a7169b3159ad4b02d0352f655fbe8f5d59d Mon Sep 17 00:00:00 2001 From: Oleg-designer Date: Wed, 5 May 2021 17:46:04 +0300 Subject: [PATCH] ref #11 add translation --- README.md | 12 ++++++++++++ qmlNotify_languages/en.ts | 4 ++-- qmlNotify_languages/ja.ts | 4 ++-- qmlNotify_languages/ru.ts | 4 ++-- qmlNotify_languages/tr.ts | 4 ++-- qmlNotify_languages/ua.ts | 4 ++-- 6 files changed, 22 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0023641..0e54905 100644 --- a/README.md +++ b/README.md @@ -113,3 +113,15 @@ Connections { } ``` +### Include translations + +For include translations into your projects you need to use the QuasarAppUtils::Locales class. See oficiald [documentation](https://quasarapp.ddns.net:3031/docs/QuasarApp/QuasarAppLib/latest/classQuasarAppUtils_1_1Locales.html) + +```cpp +if(!QuasarAppUtils::Locales::init(locale, {":/qmlNotify_languages/"})) { + QuasarAppUtils::Params::log("Error load language : " , QuasarAppUtils::Error); +} +``` + +Or you can manually load needed qm file. +All qm files located in qmlNotify_languages folder. \ No newline at end of file diff --git a/qmlNotify_languages/en.ts b/qmlNotify_languages/en.ts index 903d1c6..8077364 100644 --- a/qmlNotify_languages/en.ts +++ b/qmlNotify_languages/en.ts @@ -1,13 +1,13 @@ - + NotificationForm Message - + Message diff --git a/qmlNotify_languages/ja.ts b/qmlNotify_languages/ja.ts index 903d1c6..2de73d8 100644 --- a/qmlNotify_languages/ja.ts +++ b/qmlNotify_languages/ja.ts @@ -1,13 +1,13 @@ - + NotificationForm Message - + メッセージ diff --git a/qmlNotify_languages/ru.ts b/qmlNotify_languages/ru.ts index 903d1c6..c7975fe 100644 --- a/qmlNotify_languages/ru.ts +++ b/qmlNotify_languages/ru.ts @@ -1,13 +1,13 @@ - + NotificationForm Message - + Cообщение diff --git a/qmlNotify_languages/tr.ts b/qmlNotify_languages/tr.ts index 903d1c6..98c8116 100644 --- a/qmlNotify_languages/tr.ts +++ b/qmlNotify_languages/tr.ts @@ -1,13 +1,13 @@ - + NotificationForm Message - + İleti diff --git a/qmlNotify_languages/ua.ts b/qmlNotify_languages/ua.ts index 903d1c6..a0fa610 100644 --- a/qmlNotify_languages/ua.ts +++ b/qmlNotify_languages/ua.ts @@ -1,13 +1,13 @@ - + NotificationForm Message - + Повідомлення