menstral screenshot

Translating Menstral, mobile menstrual calendar

Since Menstral version 1.6, it is possible to easily translate ('localize') Menstral to any language. I want to offer for download on the Menstral web page versions localized to many languages. I need help from speakers of different languages to do the translations to those languages.

Changes in version 1.7

Starting with version 1.7, there is a single JAR file which contains all the available languages (as opposed to v1.6, which had one JAR per language). Inside the JAR (which is a ZIP archive) you find a directory 'lang/' containing files named '0', '1', etc. These are text files (with UTF-8 encoding), each file corresponding to one language. The language file '0' corresponds to English, and is the default language which is loaded initially. To make a new translation, you should edit this file ('0') to make it correspond to the new language (translate the strings to your language). Send me the new language file by email, so that I include it in the distribution.

How does it work

Inside the Menstral.jar archive (jar files are zip-archives) is a file named 'lang.txt', which contains all the text displayed by the program. If you download the english version of Menstral, than 'lang.txt' contains english text. You can translate the text to your language, and re-integrate the modified 'lang.txt' back to Menstral.jar, and voila, you have a new version of Menstral, localized to your language. You can send me the translated 'lang.txt' and I'll put in on the Menstral web page, so that other people can use your translation too.

The format of the language file 'lang.txt'

a typical line looks like this:
57 {January}
57 is a key, used by the program to identify the text. You should leave these numbers unchanged. The text follows the number, and is enclosed between curly brackets '{' and '}'. The curly brackets mark the beginning and the end of the text corresponing to that numeric key. The text inside curly brackets can span multiple lines, and all the line brakes (new-line) are preserved in the text. The same line in the romanian translation looks like this:
57 {Ianuarie}
You can also find comments starting with '#' in that file (these are ignored, and don't need to be translated).

Using special national characters

Many languages have characters which are not basic-latin. These 'special' characters can be used without problems in the lang.txt translation. What's important, is that lang.txt must be encoded in UTF-8 encoding. That's easy, you can edit it with Notepad or Word, use any national characters you need, and take care when you save it, to specify 'UTF-8' in Notepad, or text with UTF-8 encoding in Word (use 'Save as').

A step-by-step guide to authoring a new translation of Menstral

  1. download Menstral.jar version 1.6 to your computer
  2. rename Menstral.jar to Menstral.zip (because jars are zip archives)
  3. open Menstral.zip with any program capable of opening zip archives
  4. extract the file 'lang.txt' from the archive, copy it somewhere
  5. edit the extracted lang.txt with Notepad or Word. Replace the text in that file with the translation to your language. Save the edited file as text-file with the UTF-8 encoding (which is supported by both Notepad and Word).
  6. replace the file lang.txt in the Menstral.zip archive with your new, translated file.
  7. rename the modified Menstral.zip to Menstral.jar
  8. run the new Menstral.jar on your phone or on an emulator. Check that the translation is correct, and how it works.
  9. use it happily, and
  10. send to mihai (at menstral.net) your new 'lang.txt' in order for me to include the new traslation/language on Menstral's web page.

Translation authors

I want to thank the people who kindly contributed translations:

Language   ISO 639-1  Translated by
Bosanski bsAhmed
Čeština csMila
Deutsch deCarsten Barleben
Español esNéstor D. Díaz
Italiano itLord Xadar
Lietuvių ltVida Pranevičiūtė
Polski plDorota
Română roMihai Preda
Русский ruIngvaR
SlovenščinaslUroš
Slovenčina skEmsi
Srpski srMilan
Türkçe trEnes Kuru
Українська ukСергій Кравчук