%-- List-and-edit form for Base Text. --%>
Natural Language Key Coder Key Simple Versus Compound Messages These place holders start at _1_, and increase from there.
The order of the parameters can differ between Locales, but each the message
must have the same number of parameters across all of its Locales.
The Base Text is the text that is to be translated. The programmer works
in Base Text, and almost always codes as if the application uses
only a single language (in the default Locale - in this example, English).
For example, all messages that an Action may emit are in Base Text.
Base Text comes in two forms - Natural Language keys, and Coder Keys.
This is the preferred style for the programmer - simply to use natural
language text (in the default Locale of the application).
For example, an Action might respond with a message to the end user,
using a Natural Language key :
addMessage("Item deleted successfully.");
This allows code to be more legible
at the point of call, while still allowing for full translation.
A Natural Language Key needs translation for all Locales except for the
default Locale.
A Coder Key is text such as 'add.button'. This text is meant only for the
programmer. It is not intended for the end user, in any language. A
Coder Key needs translation into all target languages, including the
default Locale.
Simple messages have no parameters, as in
Item added successfully.
Compound messages, on the other hand, take data as parameters. Special place holders
are used for the parameters, as in
On _1_, I will go to a restaurant named _2_ for lunch.
Here, _1_ stands for a date, while _2_ stands for the name of a restaurant.
<%-- Listing. --%>
# | Base Text | Is Coder Key | ||
---|---|---|---|---|
${index.count} | ${item.baseText} |
|