0

I am trying to translate some text using t9n library, but I get this error

Compiling...
Error compiling ICU message for locale en-US: SyntaxError: Expected "=", "}", or identifier but "," found.

To debug this set DEBUG_ICU to 'true'

when I use this piece of code in React JS

`t9n("{count, plural, one {one other}, others {# others}}", { count: userIds.length - 1 })`;

How can I resolve this?

halfer
  • 19,824
  • 17
  • 99
  • 186
Abhisar Tripathi
  • 1,569
  • 10
  • 21

1 Answers1

0

Couple of errors comma should not be there before others and others should be other. Also we can change {one other} to {# other} as this is more optimal.

`t9n("{count, plural, one {# other} other {# others}}", { count: userIds.length - 1 });`
Abhisar Tripathi
  • 1,569
  • 10
  • 21