Recent

Author Topic: Language restore at runtime  (Read 2492 times)

Maciej Kaczkowski

  • New Member
  • *
  • Posts: 31
    • Password Recovery Software
Language restore at runtime
« on: October 01, 2016, 08:37:16 pm »
Hi,

Is there a possibility to restore embedded language on runtime?

for example, embbeded language is polish, I would like to switch to en and after that I would like to restore the built-in language:
SetDefaultLang('en');
SetDefaultLang('');  - doesn't work (Laz 1.4.4) there is no project.pl.po file

Best regards
« Last Edit: October 01, 2016, 08:41:48 pm by Maciej Kaczkowski »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Language restore at runtime
« Reply #1 on: October 03, 2016, 10:56:46 am »
Hi,

Is there a possibility to restore embedded language on runtime?

for example, embbeded language is polish, I would like to switch to en and after that I would like to restore the built-in language:
SetDefaultLang('en');
SetDefaultLang('');  - doesn't work (Laz 1.4.4) there is no project.pl.po file

Best regards
Did you try to create the "project.pl.po" file? ;)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Language restore at runtime
« Reply #2 on: October 03, 2016, 11:07:11 am »
Not very convenient, but if you copy 'project.po' to 'project.pl.po', open 'project.pl.po' in poedit, select every string item and press CTRL+B in order to copy the original text as translated text, then you should have an ordinary polish translation file which should work like any other po file.

Maciej Kaczkowski

  • New Member
  • *
  • Posts: 31
    • Password Recovery Software
Re: Language restore at runtime
« Reply #3 on: October 03, 2016, 07:18:43 pm »
Hi,

Is there a possibility to restore embedded language on runtime?

for example, embbeded language is polish, I would like to switch to en and after that I would like to restore the built-in language:
SetDefaultLang('en');
SetDefaultLang('');  - doesn't work (Laz 1.4.4) there is no project.pl.po file

Best regards
Did you try to create the "project.pl.po" file? ;)

Yes, the problem is that polish/embbeded string is not translated, like this:
msgctxt "rtconsts.str_cancel"
msgid "Anuluj"
msgstr ""

should be:
msgctxt "rtconsts.str_cancel"
msgid "Anuluj"
msgstr "Anuluj"

I'm looking for a solution that would allow the entry of build in strings to .po file on runtime.

 

TinyPortal © 2005-2018