Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate QML-only messages with QTranslator #81

Merged
merged 4 commits into from
Jan 19, 2021
Merged

Conversation

notmart
Copy link
Collaborator

@notmart notmart commented Jan 19, 2021

Some messages are needed to be in the QML file directly, this means they can't be translated from the python part, so use the internal Qt translation infrastructure.
see https://doc.qt.io/qt-5/qtquick-internationalization.html

All qml files will need to do text messages with the qsTr method call like so:

Label {
    text: qsTr("Text to be translated")
}

@AIIX AIIX merged commit a68a237 into master Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants