ref #11 add translation

This commit is contained in:
Oleg-designer 2021-05-05 17:46:04 +03:00
parent 48a1b6fd22
commit 09012a7169
6 changed files with 22 additions and 10 deletions

View File

@ -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.

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>