Rox 1.2 displaying UTF-8

For efforts in internationalising Puppy and solving problems in this area
Post Reply
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

Rox 1.2 displaying UTF-8

#1 Post by MU »

http://www.murga-linux.com/puppy/viewtopic.php?t=11221

The Gtk-themeselector with the option to choose a font:
http://www.murga-linux.com/puppy/viewtopic.php?t=10616

This script can be used as a base for a custom, simplified language-setter, I used it for a servicepack for Muppy005.
You must save it using utf-8 activated in the save-as dialog in leafpad.

Code: Select all

#!/bin/bash

# set language


Xdialog --no-cancel --menu "Language - Sprache\n
\n
"  15 70 8 "english" "" "de_DE (Deutschland)      " "" "de_AT (Österreich)   " "" "de_CH (Schweiz)   " "" "de_LU (Luxemburg)   " "" 2>/tmp/muppyresult

result=`tail -n 1 /tmp/muppyresult|sed "s/ .*//"`
rm -f /tmp/muppyresult

echo ------- $result

if [ "$result" == "english" ];then
 NEWLANG="LANG=en_US"
else
 NEWLANG="LANG=$result.utf8"
fi


 CURRENTLOCALE="`cat /etc/profile | grep "LANG=" | cut -f 2 -d '=' | cut -f 1 -d ' ' | cut -f 1`"

 OLDLANG="LANG=$CURRENTLOCALE"

 cat /etc/profile | sed -e "s/${OLDLANG}/${NEWLANG}/" > /tmp/profile
 sync
 cp -f /tmp/profile /etc/profile
 sync

cd
setrox1

 myLOCALE="`cat /etc/profile | grep "LANG=" | cut -f 2 -d '=' | cut -f 1 -d ' ' | cut -f 1`"
 CURRENTLOCALE=`echo "$myLOCALE" | sed "s/_.*//"`

echo $CURRENTLOCALE

if [ "$CURRENTLOCALE" == "de" ];then
Xdialog --msgbox "X muß eventuell neu gestartet werden,
damit die Sprachänderung übernommen wird!" 0 0
else
Xdialog --msgbox "you might have to restart X
so that the language-settings take effect!" 0 0

fi

Mark

wow
Posts: 1052
Joined: Fri 30 Jun 2006, 00:18
Location: Peru

#2 Post by wow »

I'm wondering why Puppy 1.xx series can show the right characters even if not have .utf8 locales
[url=http://www.puppylinux.com][img]http://i.imgur.com/M4OyHe1.gif[/img][/url]

wow
Posts: 1052
Joined: Fri 30 Jun 2006, 00:18
Location: Peru

#3 Post by wow »

I've found another solution, just install this dotpup: iso8859-1_XLC_LOCALE.pup(8.62 KB) and restart X, thats all, no additional steps, requirements, etc :) . It's part of libX11-X11R7.1-1.0.1, you can compile it by yourself or download mine:
libX11-X11R7.1-1.0.1.tar.gz (1.37 MB) (build i486, prefix /usr/X11R7)

Sources http://mirror.sg.depaul.edu/pub/x.org/X11R7.1/src/lib/
License GPL

Up: before / Down: after
Image
[url=http://www.puppylinux.com][img]http://i.imgur.com/M4OyHe1.gif[/img][/url]

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#4 Post by zigbert »

wow. Thanks a lot for your solution. :lol:

Post Reply