Command or script to change GUI language

AlexWilMac

Moderator
As I often change the GUI language, I wonder if there is a command you can give by the command line or, anyway, a way to create a script to perform the change.
Any clues?
 

KFL

Vu+ User
Hi, I attached scripts for changing language.
#put this script in /usr/script/
#set attributes to 755
#run script via buttons green->blue->select script->OK

Read comments in script.
You can make own, just search&replace (3 occurences)

Check curent locale
root@vuuno:~# grep 'config.osd.language' /etc/enigma2/settings
config.osd.language=sk_SK


List installed locale packages
opkg list-installed enigma2-locale-*

Check installed scripts
root@vuuno:~# ls -l /usr/script/SET*
-rwxr-xr-x 1 root root 509 May 12 19:06 /usr/script/SET_language_EN.sh
-rwxr-xr-x 1 root root 509 May 12 19:06 /usr/script/SET_language_IT.sh
-rwxr-xr-x 1 root root 509 May 12 19:06 /usr/script/SET_language_SK.sh
 

Attachments

  • SET_language_XX_scripts.zip
    1.5 KB · Views: 12
Last edited:

AlexWilMac

Moderator
First of all, thank you!
Your script not only are a good solution but they made me notice the line in the file "settings" I hadn't noticed before.

I wonder if there is also a wget command or something like that, with whom being able not to restart GUI.
To explain it better: when I need to have the GUI in another language, usually English to help someone in the forum or whatever else, after changing it I usually don't restart GUI, because 99% of things are ready to be shown in the new language. Just exiting from the menu and recalling it, shows menus (and plugins, usually) in the new chosen language.
Actually, until OBH 4.1, I think, you don't even got the message box about the need of restarting GUI.

So, I wonder if or someone else know a way to do the same without the restarting of GUI.
Anyway, I consider your script precious and very helpful! :)
 

KFL

Vu+ User
config.osd.language

====enigma2 settings====

grep 'config.osd.language' /etc/enigma2/settings

====curl method====
curl -s "http://localhost/web/settings" | grep -A 1 config.osd.language
curl -s -X POST "http://localhost/api/saveconfig?key=config.osd.language&value=en_US"
-s silent mode
-X <HTTPmethod> saveconfig need POST
grep -A 1 show additional 1 lines


====wget method====
wget -q -O - "http://localhost/web/settings" | grep -A 1 config.osd.language
wget -q -O - --method=POST "http://localhost/api/saveconfig?key=config.osd.language&value=en_US"
-q quiet
-O <file|-> output to file, - for stdout
--method=<HTTPmethod> saveconfig need POST
grep -A 1 show additional 1 lines


root@vuuno4kse:~# grep 'config.osd.language' /etc/enigma2/settings
config.osd.language=sk_SK
root@vuuno4kse:~# wget -q -O - "http://localhost/web/settings" | grep -A 1 config.osd.language
<e2settingname>config.osd.language</e2settingname>
<e2settingvalue>sk_SK</e2settingvalue>
root@vuuno4kse:~# wget -q -O - --method=POST "http://localhost/api/saveconfig?key=config.osd.language&value=en_US"
{
"result": true
}root@vuuno4kse:~# grep 'config.osd.language' /etc/enigma2/settings
config.osd.language=sk_SK
root@vuuno4kse:~# wget -q -O - "http://localhost/web/settings" | grep -A 1 config.osd.language
<e2settingname>config.osd.language</e2settingname>
<e2settingvalue>en_US</e2settingvalue>
root@vuuno4kse:~#

PROBLEM:
-config changed, but not aplied, see command output: grep 'config.osd.language' /etc/enigma2/settings
-you must restart enigma2: init 4 && sleep 5 && init 3
 
Top