Add translation support #101
Thanks for this nice project!
I would like translation capability for string resources is added.
I've added support for using TinyIB in other languages. I reached out to Weblate to add TinyIB so anyone may contribute translations there. I will close this once that's available.
What are the steps to add a new translation?
Here is what I tried, that did not work:
- Cloned the file
locale/it.poand translated some strings;
After step 2, reloading the page does not show the translations; rebuilding the page does not show the translations.
So I also created the file
locale/it/tinyib.mo file, with command
msgfmt it.po -o it/tinyib.mo
Translations are still not shown, either reloadind the page or rebuilding the db.
(Once Weblate approves TinyIB these manual steps won't be necessary)
To manually translate, create a folder in
locale/ with your language code as its name, then create a subfolder within it named
LC_MESSAGES. The translated
tinyib.mo should be placed within
I could not make it work. I have these additional files:
Please verify that your installation supports gettext by creating a file with the following contents:
--with-gettext= should be present in the Configure Command.
I will clarify this requirement in the README.
--with-gettext=should be present in the Configure Command.
I do not get this, but I get a table like the following for the installed modules:
PHP Version 7.3.19-1~deb10u1 in Raspbian (Raspberry Pi4).
PHP requires the system have the requested locale installed to use translations available for that language. This is a bizarre requirement and it makes using Gettext for this unfeasible. I will implement translation handling using php-gettext instead.
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?