Coder Social home page Coder Social logo

andreaugustodev / python-qml-dynamic-language-switch Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 4 KB

This is a basic example of implementing dynamic language switching when running an application in PySide and QML.

License: MIT License

Python 51.27% QML 48.73%
qml qml-samples python python3 pyside2 pyside6 pyside2-gui pyqt pyqt5 pyqt5-gui

python-qml-dynamic-language-switch's Introduction

Python QtQuick Dynamic Language Switch

This is a basic example of implementing dynamic language switching when running an application in PySide and QML. It was only tested with PySide6, but I believe it can be adapted to PyQt5/6 and PySide2 without complications.

[English | Portuguese]

Requirements

Tips

Here are tips on how to get the texts and compile them

Extract translatable texts:

lupdate .\main.qml -ts .\locale\en-US.ts .\locale\fr-FR.ts .\locale\zh-CN.ts

In this example, the texts are extracted from the main.qml file and exported in .ts format in the locale folder according to the specified names.

At this point translate these files using the translation software.

Compiling translated texts: If you want to compile all languages ​​at once

lrelease .\locale\*.ts

Or if you just want a specific one:

lrelease .\locale\fr-FR.ts

License

MIT

python-qml-dynamic-language-switch's People

Contributors

andreaugustodev avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.