What is different from original Puppy?
When you change locale in Puppy then you must restart X: and all apps are away.
This new switcher is just restarting JWM and rox.
All utils and apps launched from desktop icon or from menu run in the new locale.

QuickLocaleSwitcher is in /usr/bin and desktop menu.

Translatable by momanger. -NLS.pet would follow if some translations were posted here.

I don't pretend to completely understand how it does what it does, but I've never seen anything lke it before...congrats!

How it does what it does
In Puppy you seem to have chosen activation of locale nl_NL
default is en_US, English is always there because English messages are used by the coders.
If you have no other locale there would be no GUI, the locale would just toggle to en_US or back to nl_NL.
But I hope that you have installed German langpack_de and chosen locale de_** once.
Then i.e. if you have more than 2 locales you have the GUI showed in 1st post.
It uses default fixmenus (a bit tuned for speed) and default fixdesk.
If you start it from command line (copy Code to a console anpress ENTER)

Code:

QuickLocaleSwitch

then you will see how many ( ) seconds it needs for what it does. Chosen new locale is updated in file /etc/profile.

Bert wrote:

Is it correct to say this is "on-the-fly 're-localisation'", without losing the active apps?
Or do you mean all apps traditionally default in Puppy are instantly available in the new language?

It is "on-the-fly 're-localisation'", without losing the active apps
but only for the dault apps which are listed if you run:

Code:

ls /usr/local/bin/default*

I have changed their code for example for defaultcalendar from

Code:

#!/bin/sh
osmo $@

to

Code:

#!/bin/sh
eval `grep '^LANG=' /etc/profile`
osmo $@

that is inserted 1 line wich is taking locale from (actualized) /etc/profile
Now you should be able to
start "plan" from desktop icon
switch locale
start "plan" from desktop icon in the new language
If you cannot then please report. version is just 0.1

Other apps stay with the old locale because they all are running under xwin. And restarting xwin would kill all apps.

But if you start from console (which is a defaultapp) then it is in new locale.

First test in my messed up frugal Macpup529 works. Have en_US and de_DE (.URGS-EIGHT) and it switches kinda fine ( jwm ) .
I need some time to detect thingys .
Am missing the gui to choose another locale as the pic shows in your first post .

That code is much faster than the original chooselocale formatting loop and contains more info . Not a Nooby and dont want offered a head -n1 -> iso-8859-1 if i want iso-8859-2 if i would be a Tchechoslowakian .

Xdialog --left --wrap --title "Glibc Locale setup" --ok-label "Restart X now" --cancel-label "Finished" --yesno "Ok, the change has been made and will take effect at next boot. However, if you click the 'Restart X now' button X will exit then restart and the new locale will immediately take effect -- however make sure that all other applications are closed first as restarting X will rudely kill them! Otherwise, just click 'Finished' for the new locale to take effect at next boot.\n\nTechnical details:\nLocale files have been generated in /usr/lib/locale (if not already) and LANG variable set to ${MY_LANG}.${MAP} in /etc/profile." 0 100
if [ $? -eq 0 ];then
rm -rf /tmp/.X0-lock
sync
exec restartwm $CURRENTWM
fi

Xdialog --left --wrap --title "Glibc Locale setup" --ok-label "Restart X now" --cancel-label "Finished" --yesno "Ok, the change has been made and will take effect at next boot. However, if you click the 'Restart X now' button X will exit then restart and the new locale will immediately take effect -- however make sure that all other applications are closed first as restarting X will rudely kill them! Otherwise, just click 'Finished' for the new locale to take effect at next boot.\n\nTechnical details:\nLocale files have been generated in /usr/lib/locale (if not already) and LANG variable set to ${MY_LANG}.${MAP} in /etc/profile." 0 100
if [ $? -eq 0 ];then
rm -rf /tmp/.X0-lock
sync
exec restartwm $CURRENTWM
fi

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum