Skip to content

Add localization support #24

@uncle-yura

Description

@uncle-yura

As I understand it, the error message code is not optimized to create localization. There is no great need for this, but it would be nice to add this feature too.

Just add "_ ()":

print(_("Triggered LinuxCNC E-Stop"))

Also need to be added at the beginning:

import locale 
import gettext

and something like this:

        locale.setlocale( locale.LC_ALL, '' )
        locale.bindtextdomain( "awlsim", LOCALEDIR )
        gettext.install( "awlsim", localedir = LOCALEDIR, unicode = True )
        gettext.bindtextdomain( "awlsim", LOCALEDIR )

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions