2 Localization for python code
MichaIng edited this page 2025-12-16 16:23:58 +01:00

To localize a text in a python file :

  • verify that the file include a line from .meyectl import lingvo
  • pass your text as an argument to _() function, actually your text must be in Esperanto. Use DeepL to translate from English to Esperanto if you don't know Esperanto.
    • example : logging.fatal(_('servilo haltis'))
  • run make in motioneye directory
  • edit the .po files for languages you are able to translate, they are named locale/*/LC_MESSAGES/motioneye.po. You can edit them with a text editor, or better with dedicated software like Poedit or Virtaal.
  • rerun make to take your translation changes into account