![]() The whitespace within the source text is visualized. Select a string to display it in the Source text field in the translation area.Select a context in the Context view to display translatable strings in the Strings view.If the developer provides a disambiguating comment, you can see it in the Developer comments field. For more information about setting the location information, see Changing the target locale. When you open several TS files to translate simultaneously, the Translator and Translator comment fields are displayed for each language. Qt Linguist displays the target language in the translation area, and adapts the number of input fields for plural forms accordingly. Only XLIFF versions 1.1 and 1.2 are currently supported. However, for standard Qt projects, only the TS file format is used. You can use Qt Linguist also to translate files in the international XML Localization Interchange File Format (XLIFF) that are generated by other programs. If you do not have a TS file, see Creating translation files to learn how to generate one. TS files are usually created and updated by lupdate. TS files are human-readable XML files containing source phrases and their translations. All the components listed above should appear in the chosen language.Open translation source (TS) files in Qt Linguist for translation. Don’t restart your computer (that just means that Finder, and other apps already running, may not use the chosen language until you do restart, or unless the apps are designed to change language dynamically.) Start your app. Move a language to the top of the list and close the dialog. To test, use System Preferences>Languages. Your app won’t contain any localizable resources that OSX understands or needs, i.e. In a PyQt projects, localizable resources will be in a myApp_rc.py file. your GUI face (localized by your projects.Qt dialogs (localized by Qt project, e.g.native dialogs (localized by platform, but depends on your bundling/packaging) e.g.Much of your GUI is from Qt, and is translated by Qt, but Qt displays some native dialogs (provided by OSX) and these are localized by OSX according to the presence of the xx.lproj files. By “OSX knows” I mean: OSX translates native dialog strings according to. For a Qt app, these xx.lproj folders will contain little if anything, just a placeholder, say a single Localizable.string, which really is not used by your app. OSX knows what translations your Qt app supports only by the set of xx.lproj folders in the Resources folder of your app bundle. The file ist does not seem to be necessary anymore (on OSX 10.9 and Qt5) to get a Qt app to be localized (despite what certain Qt documentation says.) That is, this is not affected by the user reprioritizing languages using System Preferences>Languages. Unless you change your environment variables, or the settings of the terminal. In OSX, a terminal always shows environment variable LANG equal to ‘en’ or similar, that is, English. I think it is just used in marketing, that is the stores use this to decide whether your app should be in a store in a certain country. I don’t think this has any effect on how OSX treats your app. In ist, the key CFBundleLocalizations, which appears as key “Localizations” in the Xcode GUI. ![]() ![]() Your app using translators for the language given by QLocale.system().name() is not usually the right thing to do. You have translated your app’s localizable strings to a set of languages (using Qt tools for i18n.) OSX has a prioritized list of the languages the user prefers (from System Preferences>Languages.) Your app must find the best fit. Your app must negotiate with OSX using QLocale.uiLanguages, to decide what translators to install. Brief notes, possibly wrong, from my experience:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |