Forum > Translations
Localization of Slavic plurals?
CM630:
AFAIK, PO supports the translation of numbers in Slavic languages.
Shortly the issue is that in some Slavic languages if the number ends with “one”,“two”,“three” or “four” the plural form is different than in the other cases.
I found no info on how to handle it in Lazarus.
Shall I use Format or some other function? And shall I handle it manually in the POT files or can it be handled automatically?
I use
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- resourcestring lngSomeString = '%d files found';
Edit: It occurs that I have mentioned this in 2013, but it was not answered.
domasz:
In Polish we translate this way:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---lngSomeString = '%d plik/ów znaleziono';
Or write a specialized function.
CM630:
PO is designed to support such cases.
Just think about your own example:
lngSomeString = '%d plik/ów znaleziono';
You might need 3 separate cases:
1. When there is a single item (1 plik).
2. When there are 2 to 4 items (3 plikow)
3. When there are 5 to 20 items (9 plika)
Here is some info, item 12.6.
https://www.gnu.org/software/gettext/manual/html_node/Translating-plural-forms.html
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---#, c-formatmsgid "One file removed"msgid_plural "%d files removed"msgstr[0] "%d slika je uklonjena"msgstr[1] "%d datoteke uklonjenih"msgstr[2] "%d slika uklonjenih"
domasz:
Here's the thing- translating perfectly is super hard. So 99% companies, even Polish ones, don't care.
"5 plik/ów" is fine.
Yes, you could make a perfect translation of this but then you should make perfect translations of all similar cases, and there is a lot of them in Polish.
For example- programs often welcome users or use their names in other cases:
Hello, Tom!
Good morning, Tom!
Thank you for your purchase, Tom!
In Polish you should use declension and rules for declensions of names are super complicated:
Dzień dobry, Tomaszu! (Tomasz)
Dzień dobry, Anno! (Anna)
Dzień dobry, Hubercie! (Hubert)
Dzień dobry, Sławomirze! (Sławomir)
Dzień dobry, Jacku! (Jacek)
Dzień dobry, George'u! (George)
Dzień dobry, Stevenie! (Steven)
ackarwow:
Perhaps there is another way, even less complicated: 'number of found files: %d' which in Polish can be translated as 'liczba znalezionych plików: %d'.
Navigation
[0] Message Index
[#] Next page