I'm using the ICU Message Format for i18n in an application.
Some of the strings involve dynamic-length comma separated lists. For instance, the string:
"There are three pets: a dog, a fish, a cat."
may be generated with this message:
"There are {count} pets: {list}"
Where count is the length of the list, and list are the individual strings themselves. (As an aside, were this a real string I'd be configuring "pets" per "count," but let's keep it simple).
In pseudocode, the list variable might be generated like so:
pets.join(', ');
That last bit is what I'm not a fan of. It seems to only make sense for LTR languages, and possibly just a subset of LTR languages.
I have two questions:
How should comma-separated lists be formatted in other languages, such as RTL languages?
Does the ICU Message Format support that in any way, or does it require a system in addition to ICU to generate the lists?
For what it's worth, this is a JavaScript webapp, although the answers to these questions are probably language-agnostic.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)