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 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.1"> +<TS version="2.1" language="en_US"> <context> <name>NotificationForm</name> <message> <location filename="../NotifyModule/NotificationForm.qml" line="16"/> <location filename="../NotifyModule/NotificationForm.qml" line="18"/> <source>Message</source> - <translation type="unfinished"></translation> + <translation>Message</translation> </message> </context> </TS> 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 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.1"> +<TS version="2.1" language="ja_JP"> <context> <name>NotificationForm</name> <message> <location filename="../NotifyModule/NotificationForm.qml" line="16"/> <location filename="../NotifyModule/NotificationForm.qml" line="18"/> <source>Message</source> - <translation type="unfinished"></translation> + <translation>メッセージ</translation> </message> </context> </TS> 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 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.1"> +<TS version="2.1" language="ru_RU"> <context> <name>NotificationForm</name> <message> <location filename="../NotifyModule/NotificationForm.qml" line="16"/> <location filename="../NotifyModule/NotificationForm.qml" line="18"/> <source>Message</source> - <translation type="unfinished"></translation> + <translation>Cообщение</translation> </message> </context> </TS> 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 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.1"> +<TS version="2.1" language="tr_TR"> <context> <name>NotificationForm</name> <message> <location filename="../NotifyModule/NotificationForm.qml" line="16"/> <location filename="../NotifyModule/NotificationForm.qml" line="18"/> <source>Message</source> - <translation type="unfinished"></translation> + <translation>İleti</translation> </message> </context> </TS> 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 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.1"> +<TS version="2.1" language="uk_UA"> <context> <name>NotificationForm</name> <message> <location filename="../NotifyModule/NotificationForm.qml" line="16"/> <location filename="../NotifyModule/NotificationForm.qml" line="18"/> <source>Message</source> - <translation type="unfinished"></translation> + <translation>Повідомлення</translation> </message> </context> </TS>