Foregn language letters in system.gui.confirm

This might be the same result as this post:

The Norwegian letters Æ,Ø Å, are working everywhere in ingition, except in the messagebox and confirm dialogs.

Anyone know how to workaround this so that the native letters are shown.

To be precise… This code:

if system.gui.confirm("Ønsker du virkerlig å laste ned denne resepten til PLS?","Er du sikker?"):

Gives this result:

Have you tried prefixing those strings with u?

if system.gui.confirm(u"Ønsker du virkerlig å laste ned denne resepten til PLS?", u"Er du sikker?"):

Yes, you might want to make sure the strings are in unicode.

Like Kevin and RadicalRumin said, python’s handling of anything outside of a-z0-9 is not intuitive – you need to prefix your string with a u to indicate that it’s a unicode string.

The other post is different, in that it’s referring to the Yes / No boxes. Those are not translatable for reasons beyond our control, so you you need those to be in Norwegian you will need to make your own popup window and deal with the button presses yourself.

That did it :blush:

1 Like