Hello everyone,
I began to use L20n in order to offer localization to a small blog theme and
I'm facing a little problem: I can't get plurals to work.
I found many examples on how to use the library, with the many a-different
files extensions and usage but from all those I've tried, I don't know why they
don't work and which one should work.
So if anyone can help me, here's the thing.
The theme is an AnchorCMS theme. Data is inserted into the DOM through PHP, I
tried to have the data added as a script :
<script type="application/l10n-data+json">
{
"comments" : 3
}
</script>
and as an HTML attribute : <span data-l10n-id="commentsCount"
data-l10n-args='{"comments": "John"}'></span>
I'm using this simple macro : <plural($n) { $n == 0 ? "zero" : $n == 1 ? "one"
: "many" }>
For this rule :
<commentsCount [plural($comments)] {
zero: "There are no comments.",
one: "There is one comment.",
many: "There are {{ $comments}} comments." => I also saw the
${comments}i notation.
}>
And it only displays the variable name : CommentsCount
I've been on this for a few days now, and searching through the web gave me
many way to do the trick, but none of them worked, I guess it may be a simple,
dumb, issue, so if you could help me resolve it, that would be awesome.
Thanks in advance,
Sampson S.
_______________________________________________
tools-l10n mailing list
[email protected]
https://lists.mozilla.org/listinfo/tools-l10n