aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/doc_src_i18n.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Mention retranslateUi() in source code translation pageAndreas Eliasson2023-09-131-0/+11
| | | | | | | | | | When using Qt Widgets with uic, inform the user of the ui.retranslateUi function. Also, add code snippet to clarify how to use the function. Fixes: QTBUG-110846 Pick-to: 6.6 6.5 Change-Id: I67a01fe5fbda47124396792bd2198bdf908838c2 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* qml/i18n: Mention LanguageChange event for C++ typesFabian Kosmale2023-02-081-0/+52
| | | | | | | | | | | | | | | | | | When QQmlEngine::retranslate refreshed all bindings, that conveniently worked also for C++ properties. However, that is no longer the case since Qt 6.2, which only refreshes actual translation bindings. As bindings cannot know that a C++ setter uses a translation macro/function, there needs to be a way to inform the engine about them. Promote event handling as the recommended approach in C++ types, which aligns with what needs to be done in a Widgets application. Task-number: QTBUG-102393 Pick-to: 6.5 Change-Id: I16b91fcea35331d300fd70756de8819740b5dcb4 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Consolidate internationalization documentationLeena Miettinen2023-01-251-21/+0
| | | | | | | | | | | | | | | | | | - Combine the "Internationalization with Qt" and "Internationalization and Localization with Qt Quick" topics - Add a "Localizing Applications" topic - Move information from the Qt Linguist Manual developer section to the new topics - Add a link to a YouTube video about localizing apps - Use active voice and present tense Fixes: QTBUG-71876 Change-Id: If2db1d4865e47a85e0b63adac326fc123ad65e50 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-071-49/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Idfd176b7f7b077a5b7c66b7738dc9bcac94ab290 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Replace uses of deprecated _qs with _sSona Kurazyan2022-04-261-2/+4
| | | | | | Task-number: QTBUG-101408 Change-Id: I011d5ed352298902158d0b1b89ad3b99b310fc83 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Update documentation on translationsFriedemann Kleint2021-08-311-4/+6
| | | | | | | | | Adapt to qtbase/74515a7a30b809a3ab0a2d67496e870ea3c872e6. Pick-to: 6.2 Change-Id: I200e8a6803a46deb064f84d312a15e888f5d4e6d Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Make docs encourage readers to query locale rightMiłosz Kosobucki2020-04-211-1/+1
| | | | | | | | | | | | | | | | | Currently the example shows the usage of "filename" + QLocale::name() which will not work correctly for users with different locale and display language. Even the QTranslator::load() docs discourage using it in this way. This approach is copied by users of Qt. For example in KDE: https://github.com/search?q=org%3AKDE+%22%2B+QLocale%3A%3Asystem%28%29.name%28%29%22&type=Code We should follow the best practice in the first place the user is going to look at when working with i18n in Qt. Hopefully, with this change the incorrect code will slowly die out. Change-Id: I881f50f39740632bbd4640495270aae22bd44d0d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* I18N: describe loading translations for Qt modulesLeena Miettinen2019-09-251-7/+8
| | | | | | | | | | | | | | | | | Make the first example simpler and move the code for locating Qt modules to a subsection. Map Qt modules to catalogs available in the qttranslations repository. Explain that devs can either use the meta catalog or pick the catalogs for the modules that they use (only available way for new Qt 5 modules). Task-number: QTBUG-69203 Change-Id: I0727ca3b5547349ab2a1e387040086ead532b688 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-011-4/+4
|\ | | | | | | | | | | | | | | Conflicts: doc/src/legal/3rdparty.qdoc doc/src/platforms/emb-linux.qdoc Change-Id: I8fcdb28b51438b5135cd31176bc635a6daad269b
| * Fix invocation of static methods of QCoreApplication and subclassesFriedemann Kleint2016-07-181-4/+4
| | | | | | | | | | | | | | Replace qApp-> by static invocation where applicable. Change-Id: I24df2689b0df8609d1aa8e7c9c9da75ed94a4bab Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Unify license header usageAntti Kokko2016-02-041-3/+13
|/ | | | | | | Updated BSD license. Change-Id: Icc360a040f76765d920750f4e590da2717b7041f Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Update copyright headersAntti Kokko2015-02-171-4/+4
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Iedecec76f88fcf709d31bf7bfc5fe817302ecae1 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: Fix small typoJan Arve Saether2014-02-261-1/+1
| | | | | | | | Task-number: QTBUG-36981 Change-Id: I0663aa58def0bda7601fad4e0c10362a562b0290 Reviewed-by: Nico Vertriest <nico.vertriest@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: edit information about i18nLeena Miettinen2013-04-151-0/+16
| | | | | | | | | | | | Make "Internationlization with Qt" about the classes that support i18n and move all other information to "Writing Source Code for Translation". Combine with information from the Qt Linguist Manual and remove redundancy. Change-Id: If7f4d7702ca7fcffcca262f33494867a028449d0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: If537f6b98e4a68d1bfacf562c48332db8912c26a Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-6/+6
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I887dbadf259a84981160c00476a93fe581b4baa2 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I26014382bafefcdb1cbb982e4a6a72dc94df09ae Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-201-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Ia673fb3c9e144cfa4c0e02b82cd754d9ec45cce2 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | | Change-Id: I2b443891f2c91b90be2f2df61a0dde4a93a86967 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+175
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12