FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Translations » Special singular/plural rule
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Special singular/plural rule [message #160714] Fri, 16 October 2009 16:12 Go to next message
OsamaK is currently offline  OsamaK
Messages: 4
Registered: September 2009
Karma: 0
Junior Member
In Arabic, we need to use six entries for singular/plural. It's defined globally in most free software (including GNOME, KDE and MediaWiki) as:

nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;


Can you please define this rule in FUDforum?
Re: Special singular/plural rule [message #160720 is a reply to message #160714] Fri, 16 October 2009 16:30 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
It is already defined in the latest FUDforum 3.0.0 RC2 release. Look at "language.inc" in the thm/default/i18n/arabic directory:

	if ($count == 0) {
		$index = 0;
	} elseif ($count == 1) {
		$index = 1;
	} elseif ($count == 2) {
		$index = 2;
	} elseif ($count % 100 >= 3 && $count % 100 <= 10) {
		$index = 3;
	} elseif ($count % 100 >= 11 && $count % 100 <= 99) {
		$index = 4;
	} else {
		$index = 5;
	}
	return $forms[$index];
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Use localized dates
Next Topic: Russian language - Abracadabra
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Mar 29 07:10:44 GMT 2024

Total time taken to generate the page: 0.03492 seconds