In order to create a new language for ncp-web, follow these steps

You can view the Chinese translation, which is the most translated translation of the current NCP. (using Chinese translation as a template) Since the file has not been updated for a long time, we started making new templates.

  • learn your language code here

  • those files should be copied to etc/ncp-config.d/l10n/<app>/<languagecode>.json, except for __core__.json, which goes to ncp-web/l10n/<languagecode>.json. You can find the languagecode for your currently used language here, under ‘User Language’.

  • edit those files to add the translation to your language. You can check the results in your browser at https://localhost:4443. Refresh to see any changes

  • add the language code to ncp-web/ncp-web.cfg

  • send a pull request with the changes to the devel branch

Example: translate the original template of nc-backup

{
    "translations": {
        "BACKUPLIMIT": "BACKUPLIMIT",
        "Backup this NC instance to a file": "Backup this NC instance to a file",
        "COMPRESS": "COMPRESS",
        "DESTDIR": "DESTDIR",
        "INCLUDEDATA": "INCLUDEDATA",
        "nc-backup": "nc-backup"
    }
}

to German

``` { “translations”: { “BACKUPLIMIT”: “Maximale Anzahl”, “Backup this NC instance to a file”: “Erstelle eine Backupdatei von dieser NC-Instanz”, “COMPRESS”: “Kompression”, “DESTDIR”: “Zielverzeichnis”, “INCLUDEDATA”: “Inkl. Dateien”, “nc-backup”: “Backup erstellen” } }