http://wiki.ecmascript.org/doku.php?id=globalization:messageformatting
['Some text before', {
type: 'plural', // can be plural or gender/select
valueName: 'numPeople', // placeholder for switch value
offset: 1, // optional for plural, invalid for select
one: 'Some message ${ph} with ${#} value', // no gender specific msg necessary
few: [ 'Optional prefix text for |few|', {
type: 'select',
valueName: 'gender',
male: 'Text for male option with \' single quotes',
female: 'Text for female option with {}', // {} produces {} in the output.
other: 'Text for default'
}, 'optional postfix text']],
other: 'Some messages for the default', // no gender specific msg necessary
'1': [ 'Optional prefix text', {
type: 'select'
valueName: 'gender',
male: 'Text for male option with \' single quotes',
female: 'Text for female option with {}', // {} produces {} in the output.
other: 'Text for default'
}, 'optional postfix text']],
}, 'and text after']
Proposed option:
['Some text before', {
type: 'plural', // can be plural or gender/select
valueName: 'numPeople', // placeholder for switch value
offset: 1, // optional for plural, invalid for select
options: {
one: 'Some message ${ph} with ${#} value', // no gender specific msg necessary
few: [ 'Optional prefix text for |few|', {
type: 'select',
valueName: 'gender',
options: {
male: 'Text for male option with \' single quotes',
female: 'Text for female option with {}', // {} produces {} in the output.
other: 'Text for default'
}
}, 'optional postfix text'],
other: 'Some messages for the default', // no gender specific msg necessary
'1': [ 'Optional prefix text', {
type: 'select'
valueName: 'gender',
options: {
male: 'Text for male option with \' single quotes',
female: 'Text for female option with {}', // {} produces {} in the output.
other: 'Text for default'
}
}, 'optional postfix text'],
}
}, 'and text after']