The goog.i18n.MessageFormat
Class
Constructor of MessageFormat.
pattern
{string
}
- The pattern we parse and apply positional parameters
to.
Formats a message, treating '#' with special meaning representing
the number (plural_variable - offset).
namedParameters
{!Object
}
- Parameters that either
influence the formatting or are used as actual data.
I.e. in call to fmt.format({'NUM_PEOPLE': 5, 'NAME': 'Angela'}),
object {'NUM_PEOPLE': 5, 'NAME': 'Angela'} holds positional parameters.
1st parameter could mean 5 people, which could influence plural format,
and 2nd parameter is just a data to be printed out in proper position.
- returns {
string
}
- Formatted message.
Formats a message, treating '#' as literary character.
namedParameters
{!Object
}
- Parameters that either
influence the formatting or are used as actual data.
I.e. in call to fmt.format({'NUM_PEOPLE': 5, 'NAME': 'Angela'}),
object {'NUM_PEOPLE': 5, 'NAME': 'Angela'} holds positional parameters.
1st parameter could mean 5 people, which could influence plural format,
and 2nd parameter is just a data to be printed out in proper position.
- returns {
string
}
- Formatted message.