Skip to content

Localization for javascript code

Jean Michault edited this page Mar 14, 2022 · 1 revision

To localize a text in a js file (like static/js/main.js) :

  • pass your text as an argument to function i18n.gettext() (for examples, see in static/js/main.js), actually your text must be in esperanto. Use google translate to translate from english to esperanto if you don't know esperanto.
  • run make in motioneye directory
  • edit the po files for languages you are able to translate, they are named locale/xx/LC_MESSAGES/motioneye.js.po . You can edit them with a text editor, or with dedicated software like poedit or virtaal.
  • rerun make to take your translation changes into account