Sie sind vermutlich noch nicht im Forum angemeldet - Klicken Sie hier um sich kostenlos anzumelden Impressum 
Sie können sich hier anmelden
Dieses Thema hat 17 Antworten
und wurde 1.163 mal aufgerufen
 Practical tips for translation of *.lang files (Localization)
Seiten 1 | 2
Bussinchen Offline




Beiträge: 90

13.11.2012 20:44
#16 RE: Localization with Po-files alternatively to Ini Zitat · Antworten

Yes, I know, dear Linhart.


I OpenSource!
• Scrabble3D Download: Sourceforge.net | • Scrabble3D Help: Wiki | • Scrabble3D News: Twitter | • Scrabble3D Fanship: Facebook
• Scrabble3D in Italia: Sezione Scrabble3D sul Forum della Federazione Italiana Gioco Scrabble

Scotty Offline

Administrator


Beiträge: 3.777

13.11.2012 21:14
#17 RE: Localization with Po-files alternatively to Ini Zitat · Antworten

Zitat von Bussinchen im Beitrag #13
But how can right Russian plurals ... be associated to the right numerals?

Don't mix up plural forms and numerals. Plural forms are calculated internally and you don't need to understand how it works. Russian part looks like this:

Zitat von C formula 'plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2' translated to pascal
Mod10:=aNumber mod 10;
Mod100:=aNumber mod 100;
...
if ((Mod10=1) and (Mod100<>11)) then
Result:=0 else
if (Mod10>=2) and (Mod10<=4) and ((Mod100<10) or (Mod100>=20)) then
Result:=1 else
Result:=2;


Download: Sourceforge.net | Help: Wiki | Discussion: Forum | News: Twitter | Fanship: Facebook

akerbeltzalba Offline




Beiträge: 142

15.11.2012 01:05
#18 RE: Localization with Po-files alternatively to Ini Zitat · Antworten

Zitat
But how can right Russian plurals ... be associated to the right numerals?



But maybe she was curious :) It's a bit like Mengenlehre in maths. You write a formula that explains a lot of what-if rules to the computer. For example, you can tell that computer that you want x if the number is 1, 2 or 3; that you want y if the number is 4-10 and that you want z if the number is anything else. So when the computer then runs into a number placeholder (such as %d) and this placeholder happens to be 7 (in my example) it checks the rules and finds that for the number 7, rule y applies and it will pull the translation associated with y.

Sorry I was silent, work was insane and then we had TWO deaths in the family, been a bit crazy. The good news is it's much more quiet now :)

*******************************
Do, or do not. There is no try.

Seiten 1 | 2
 Sprung  
Xobor Forum Software von Xobor.de
Einfach ein Forum erstellen
Datenschutz