[xwiki-devs] Use complex expressions in i18n choice
Hello, Doing a translation I found this message to translate {0,choice,0#No|1#One|1<{0}} included {0,choice,0#documents.|1#document:|1} So I wonder is it possible to use arithmetic expression like {0}%10 in those choice statements because in my language, the noun's ending depends on the last digit in a number . Directing me to the page describing full syntax for the language above would be enough. Regards, Roman -- View this message in context: http://xwiki.475771.n2.nabble.com/Use-complex-expressions-in-i18n-choice-tp7... Sent from the XWiki- Dev mailing list archive at Nabble.com.
On Mon, Dec 12, 2011 at 1:59 PM, coldserenity <[email protected]> wrote:
Hello,
Doing a translation I found this message to translate {0,choice,0#No|1#One|1<{0}} included {0,choice,0#documents.|1#document:|1}
So I wonder is it possible to use arithmetic expression like {0}%10 in those choice statements because in my language, the noun's ending depends on the last digit in a number . Directing me to the page describing full syntax for the language above would be enough.
See http://docs.oracle.com/javase/7/docs/api/java/text/MessageFormat.html Hope this helps, Marius
Regards, Roman
-- View this message in context: http://xwiki.475771.n2.nabble.com/Use-complex-expressions-in-i18n-choice-tp7... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Mon, Dec 12, 2011 at 3:48 PM, Marius Dumitru Florea <[email protected]> wrote:
On Mon, Dec 12, 2011 at 1:59 PM, coldserenity <[email protected]> wrote:
Hello,
Doing a translation I found this message to translate {0,choice,0#No|1#One|1<{0}} included {0,choice,0#documents.|1#document:|1}
So I wonder is it possible to use arithmetic expression like {0}%10 in those choice statements because in my language, the noun's ending depends on the last digit in a number . Directing me to the page describing full syntax for the language above would be enough.
See http://docs.oracle.com/javase/7/docs/api/java/text/MessageFormat.html
http://docs.oracle.com/javase/7/docs/api/java/text/ChoiceFormat.html precisely.
Hope this helps, Marius
Regards, Roman
-- View this message in context: http://xwiki.475771.n2.nabble.com/Use-complex-expressions-in-i18n-choice-tp7... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Thanks Marius for the hints, looks like it is not possible to do. Roman -- View this message in context: http://xwiki.475771.n2.nabble.com/Use-complex-expressions-in-i18n-choice-tp7... Sent from the XWiki- Dev mailing list archive at Nabble.com.
On 12/12/2011 09:50 AM, coldserenity wrote:
Thanks Marius for the hints, looks like it is not possible to do.
Roman
It could be possible if we add another formatter extending the Choice one, with support for more complex rules. I agree that it would be nice to have proper support for Russian-like cardinals. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Should I log a feature request? -----Original Message----- From: Sergiu Dumitriu [mailto:[email protected]] Sent: Monday, December 12, 2011 19:19 PM To: XWiki Developers Cc: Roman Muntyanu Subject: Re: [xwiki-devs] Use complex expressions in i18n choice On 12/12/2011 09:50 AM, coldserenity wrote:
Thanks Marius for the hints, looks like it is not possible to do.
Roman
It could be possible if we add another formatter extending the Choice one, with support for more complex rules. I agree that it would be nice to have proper support for Russian-like cardinals. -- Sergiu Dumitriu http://purl.org/net/sergiu/
On 12/12/2011 12:16 PM, Roman Muntyanu wrote:
Should I log a feature request?
Yes, but I don't think it will have a high priority, unless someone else provides a patch...
-----Original Message----- From: Sergiu Dumitriu [mailto:[email protected]] Sent: Monday, December 12, 2011 19:19 PM To: XWiki Developers Cc: Roman Muntyanu Subject: Re: [xwiki-devs] Use complex expressions in i18n choice
On 12/12/2011 09:50 AM, coldserenity wrote:
Thanks Marius for the hints, looks like it is not possible to do.
Roman
It could be possible if we add another formatter extending the Choice one, with support for more complex rules. I agree that it would be nice to have proper support for Russian-like cardinals.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
Sure I understand that, but when someone gets an inspiration to work on the issue, it's better to have some food for the mind logged in issue tracker: http://jira.xwiki.org/browse/XWIKI-7280 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Sergiu Dumitriu Sent: Monday, December 12, 2011 19:31 PM To: XWiki Developers Subject: Re: [xwiki-devs] Use complex expressions in i18n choice On 12/12/2011 12:16 PM, Roman Muntyanu wrote:
Should I log a feature request?
Yes, but I don't think it will have a high priority, unless someone else provides a patch...
-----Original Message----- From: Sergiu Dumitriu [mailto:[email protected]] Sent: Monday, December 12, 2011 19:19 PM To: XWiki Developers Cc: Roman Muntyanu Subject: Re: [xwiki-devs] Use complex expressions in i18n choice
On 12/12/2011 09:50 AM, coldserenity wrote:
Thanks Marius for the hints, looks like it is not possible to do.
Roman
It could be possible if we add another formatter extending the Choice one, with support for more complex rules. I agree that it would be nice to have proper support for Russian-like cardinals.
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (4)
-
coldserenity -
Marius Dumitru Florea -
Roman Muntyanu -
Sergiu Dumitriu