mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Updated Design: i18n (markdown)
parent
dfd663b7aa
commit
025ec7b752
@ -38,10 +38,22 @@ The catalog for a node-set is added under the namespace `<module>/<set>`.
|
|||||||
|
|
||||||
## Loading catalogs in the editor
|
## 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
|
/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
|
## Using i18n for messages
|
||||||
|
|
||||||
### Core Runtime
|
### 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.
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user