From 57d008adf719a5542375bdf7a4b8ca55a7d5bedb Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Thu, 26 Jul 2018 06:16:16 +0200 Subject: Doc: Add information about locale file name convention * Add details from QLocale::QLocale(const QString &name). These have been rewritten to target a less technical audience. Task-number: QTBUG-69556 Change-Id: Ibf08b0b5d6075c4f7ccaf19a3f44bf3ba90433dd Reviewed-by: Oswald Buddenhagen --- src/linguist/linguist/doc/src/linguist-manual.qdoc | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/linguist/linguist/doc/src/linguist-manual.qdoc b/src/linguist/linguist/doc/src/linguist-manual.qdoc index a035827f2..58b2542fe 100644 --- a/src/linguist/linguist/doc/src/linguist-manual.qdoc +++ b/src/linguist/linguist/doc/src/linguist-manual.qdoc @@ -509,17 +509,28 @@ \section2 Changing the Target Locale - If the target language and country are not explicitly set, \QL deducts them - from the translation source file name. For example, \c app_de.ts sets the + You can set the locale information explicitly in \gui Edit > + \gui {Translation File Settings}. If the target language and country + are not explicitly set when you open a translation source file, \QL + attempts to deduct them from the translation source file name. This + requires that the translation files adhere to the following file name + convention: + \c appname_language[_country].ts, where: + + \list + \li \c language is an ISO 639 language code in lowercase. + \li \c country is an ISO 3166 two-letter country code in uppercase. + \endlist + + If this attempt to resolve the target language and country fails, the + \gui {Translation File Settings} window opens. + + For example, \c app_de.ts sets the target language to German, and \c app_de_ch.ts sets the target language to German and the target country to Switzerland. This also helps loading translations for the current locale automatically. For more information, see \l{linguist-programmers.html}{Developers}. - If your files do not follow this convention, you can also set the - locale information explicitly by selecting \gui Edit > - \gui {Translation File Settings}. - \image linguist-translationfilesettings.png \section1 Selecting Context to Translate -- cgit v1.2.1