szmCt Manual documentation | prev | next | TOC/Language | Contact to
szmCt is designed to be translated by the GNU gettext mechanism via wxWidgets. It is also designed so that HTML can be referenced from szmCt if available.
Currently, there is nothing in place to ease the translation process. Only for HTML files, tools/create_stub_for_new_language.py and tools/replace_html_footer.py are exists, that require knowledge of python programming.
In the example below, the target language code is xx, but it is not limited to two characters, and the form xx_yy@zzzz is commonly used. If the xx part corresponds to two ISO 639-1 characters, and if the yy part corresponds to two ISO 3166-1 alpha-2 characters, it will be subject to automatic selection when the OS is running in that language. If manual selection is assumed, there is no such restriction, and you can name folders freely, including non-English ones.
You may do the translation work in a separate directory, but you will not be able to refer directly to the location of the source text as noted in szmCt.po. Even in this case, you can still translate and output the .mo file.
It is a little confusing in poEdit, but if you right-click in the list of source language and translation, you will get a pop-up menu to refer to the translation source.
Where there are only proper nouns or symbols in a row, you can leave them untranslated. Untranslated portions will simply remain untranslated.
When one of the following tasks is completed, szmCt will automatically use the translation if the language used in the environment where szmCt was launched is xx. Otherwise, you will have to specify it manually from the menu.
xx be the code for the target language. Duplicate i18n/szmCt.pot and rename it to i18n/xx.po.xx.po, no need to convert to .mo files (as they are automatically generated during build).CMakeLists.txt, immediately after the i18n/ja.po entry, either leave a space or create a new blank line and enter i18n/xx.po.3rdparty/wxWidgets/locale/xx.po, insert ${szmCt_abspath_to_wxWidgets_src}/locale/xx.po in CMakeLists.txt on the line after ${szmCt_abspath_to_wxWidgets_src}/locale/ja.po.doc/xx with the same structure and file name as doc/ja. It is also recommended to create a link from doc/index.html to doc/xx/index.html.
CMakeLists.txt for HTML and related files, but I may change it to require some work in the future.Build with the above and you will be able to use translations for xx.
Basically, this is only possible on Windows and macOS; on Linux, this would be very cumbersome even if possible, since you would need administrator privileges every time.
xx be the code for the target language. Duplicate i18n/szmCt.pot and rename it to i18n/xx.po.i18n/xx.po and generate the file named i18n/xx.mo.xx folder in i18n used by szmCt.
SZMCT_I18N_DIR setting in the CMake GUI at the time of installation.xx.mo in the newly created folder and rename it to szmCt.mo. In other words, you should now have i18n/xx/szmCt.mo.3rdparty/wxWidgets/locale/xx.po, create xx.mo for it, duplicate it in the same way, and rename it to wxstd.mo this time.doc/xx with the same structure and file name as doc/ja. It is also recommended to create a link from doc/index.html to doc/xx/index.html.
SZMCT_DOC_DIR points doc directory.Now you can use translations for xx from szmCt.