Hi all, I am working through a node I maintain and adding i18n to the html and JS
So far, I have ...
- replacing static text with spans -   - <span data-i18n="mssql.node.label.connection">
 
- replacing titles and placeholders -   - <input data-i18n="[placeholder]mssql.node.label.name"> </input>
- <div data-i18n="[placeholder]mssql.node.label.name"> </div>
 
- Accessing translations in html script -   - 
RED._("mssql.common.query")not working
 
- 
/src/mssql.html...
         var modeField = $("#node-input-modeOpt").typedInput(
                {
                    types:[
                        { value:"query", label: RED._("mssql.common.query"),  hasValue:false },
                        { value:"execute", label: RED._("mssql.common.execute_procedure"),  hasValue:false },
                        'msg', 'flow', 'global', 'env'            
                    ],
                    typeField: $("#node-input-modeOptType"),
                    default:"query"
                });
/src/en-US/mssql.json...
{
    "mssql": {
        "common": {
            "editor": "Editor",
            "query": "Query",
            "execute_procedure": "Execute Procedure"            
        },
   ...
   ...
I get this (first two items in the dropdown should be "Query" and "Execute Query" - instead, they are the path to the i18n value)...

File layout...
- src
- locales
- en-US
- mssql.json
 
- mssql.html
- mssql.js
 
- en-US
 
- locales