Updated Design: i18n (markdown)

Nick O'Leary 2015-04-28 11:41:32 +01:00
parent dfd663b7aa
commit 025ec7b752
1 changed files with 17 additions and 1 deletions

@ -38,10 +38,22 @@ The catalog for a node-set is added under the namespace `<module>/<set>`.
## Loading catalogs in the editor
A new api end-point is added to load message catalogs:
A node's localized help will automatically get included with the existing methods to retrieve the node's editor configuration.
For message catalogs, a new api end-point is added:
/locales/__lang__/__namespace__.json
For example:
/locales/en-US/node-red.json
will load the catalog for all core nodes.
/locales/en-US/node-red-contrib-twilio/twilio.json
will load the catalog for the `node-red-contrib-twilio/twilio` node set.
## Using i18n for messages
### Core Runtime
@ -60,3 +72,7 @@ A new api end-point is added to load message catalogs:
Nodes can use `RED._()` to retrieve messages. The function they are provided is pre-scoped to the node's own namespace so they don't have to worry about providing it with each message.
# TODO
- loading a node's catalog in the editor
- how to NLS the ui components of a node