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

Home » FUDforum Development » Translations » Special singular/plural rule
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Special singular/plural rule [message #160714] Fri, 16 October 2009 12:12 Go to next message
OsamaK is currently offline  OsamaK
Messages: 4
Registered: September 2009
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 12:30 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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];
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Use localized dates
Next Topic: Russian language - Abracadabra
Goto Forum:
  

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

Current Time: Sun Oct 22 15:09:51 EDT 2017

Total time taken to generate the page: 0.00640 seconds