You're not registered yet. Click here to register. Credits 
You can register here for free.
This topic has 17 replies
and has been read 584 times
 Practical tips for translation of *.lang files (Localization)
pages 1 | 2
Bussinchen Online




Posts: 10

Tue Nov 13, 2012 8:44 pm
#16 RE: Localization with Po-files alternatively to Ini Quote · reply

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


Posts: 3.606

Tue Nov 13, 2012 9:14 pm
#17 RE: Localization with Po-files alternatively to Ini Quote · reply

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




Posts: 142

Thu Nov 15, 2012 1:05 am
#18 RE: Localization with Po-files alternatively to Ini Quote · reply

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.


pages 1 | 2
 Jump  
disconnected Scrabble3D Chat Members online 1
Xobor Einfach ein eigenes Forum erstellen