[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] UI languages



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ok I found out how to do it men.
Here my little perl script to do so.
prior to that, one has to translate all the .po files. It is easy to get them 
by doing msgunfmt /usr/share/locale/en/LC_MESSAGES/...
and then compile then back to the new directory into .mo files.

After executing this script you will have the choice between 3 languages.
Isn't it good?

Any sun cobalt official developpers interested in a french language pack?

#!/usr/bin/perl -I/usr/sausalito/perl

use CCE;
use strict;

# connect to the CCE
my $cce = new CCE;
$cce->connectuds();

# find the system object
my $oid = $cce->find('System');

# get old locales
my ($ok, $system, $old, $new) = $cce->get($oid,'');
print "Old Locales: $$system{'locales'}\n";

# put our new locales
my %object;
$object{'locales'} = "\&fr\&en\&jp\&";
my ($ok, $badkeys, @info) = $cce->set( $oid, '', \%object );

# verify everything is ok
my ($ok, $system, $old, $new) = $cce->get($oid,'');
print "New Locales: $$system{'locales'}\n";

exit;

- -- 
Rene Luria <operator@xxxxxxxxxxxxx>
Unix Administrator - Infomaniak Network SA
PGP key DFE5C340 at keyserver.pgp.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9WmoeJ1jvMN/lw0ARAlcYAKCoIF6gwzSkXn52QFqc7busXnZJUACfRHg8
6TB2mMgC0FrsUuma+vdC+KA=
=hWeu
-----END PGP SIGNATURE-----