Change localization problem
  • MorphOS Developer
    geit
    Posts: 962 from 2004/9/23
    Yes, that is normal. To fully swap to a new language you need to reboot.

    All already running applications keep their language. If you start a new one or restart an application it will change the language.

    The entire locale system was originally designed to change the language on the fly, but with modern applications you have locale strings everywhere and it is simply not possible to react on a language change without an immense amount of work.

    That is why applications are just loading a catalog during launch and then stick with it.

    [ Edited by geit 20.10.2021 - 19:47 ]
  • »20.10.21 - 17:46
    Profile
  • MorphOS Developer
    geit
    Posts: 962 from 2004/9/23
    It changes the language on the fly, but not for already running applications. You need to quit and restart the applications.

    MorphOS never did and it is not worth the time implementing such thing. Just think about Ambient. It needs to ensure all applications are gone, before it even can restart. The result would be the same we have when a custom window is on a public screen and you want to change a resolution. "Please close all windows, so the new language can be set." I don't want this mess.

    The only time you can see a translation change on the fly is when MorphOS gets installed and you select a different language. This only works, because all the UI modules are libraries and the entire thing gets restarted. That is why everything is flickering away and returns. Basically the install process get restarted.

    Changing at runtime is a potential risk of dealing with old pointers and stuff. As a result an application may crash due to a forgotten text pointer. It is simply not the way to go. Programms are far to complex these days and I know several start up code pieces in my applications that would require a rewrite, just to work more than once with different catalogs.

    I cannot remember when I changed the system language. Must be years ago.
  • »26.10.21 - 13:50
    Profile
  • pOS
  • Order of the Butterfly
    Order of the Butterfly
    pOS
    Posts: 213 from 2003/11/14
    From: Bavaria
    Well, how much work it would be to adapt a program to language change at runtime depends on its
    structure and the number of dynamically created texts (e.g.when placeholders are used).

    But how can it detect a language change at all ?

    Is there sth. similar to screennotify mechanism, but for locale changes ?

    [ Edited by pOS 31.10.2021 - 00:35 ]
  • »30.10.21 - 22:21
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 669 from 2007/10/23
    From: Gelsenkirchen,...
    @pOS
    There's no "locale notify", of course GetString could trigger an app restart (new menu etc.).

    [ Editiert durch polluks 01.11.2021 - 01:40 ]
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17"
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.15
  • »01.11.21 - 00:34
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    igracki
    Posts: 374 from 2003/2/24
    From: Berlin
    You can create a notify on the locale prefs file, that should work.
  • »01.11.21 - 17:06
    Profile Visit Website