Programming :: Bash Script: How To Get Locale Translations

Apr 18, 2010

I am writing a bash script and I want it to use the locale translations for common items such as 'Home', Web Browser', 'Terminal', 'Run'...I know these are available in the system (with the correct locale packages installed) since it appears translated in the Gnome menu. How do I go about getting this information from the installed localization packages?

View 13 Replies


ADVERTISEMENT

Ubuntu Installation :: Can't Create Japanese Locale: Get A Segmentation Fault On Generating Locale?

Oct 13, 2010

Maverick 10.10 is unable to create Japanese locales on my wife's laptop (Acer Aspire 3000). This machine previously had no such problem. The install is a fresh install, since the machine froze during the upgrade (no fault of Ubuntu's). A possible complication is that it froze several times more during the install, and I have gone through many recovery boots and iterations of dpkg configure. All relevant packages are installed, I believe. Everything else works. Through System, Administration, Language Support, I have installed all components of English and Japanese. Currently English is selected. Japanese should appear in the list but does not. Japanese text appears properly, and I can write in Japanese,But all the menus are in English. Fine by me, but my wife will want Japanese when she uses the computer again (not soon).This mostly likely is a glibc/libc6 problem, as far as I can tell. I can't find any other Ubuntu user with this problem recently.And now, some outputs:1. dpkg-reconfigure locales

sudo dpkg-reconfigure locales
Generating locales...
en_AG.UTF-8... done

[code].....

View 1 Replies View Related

Ubuntu :: Wrong Locale \ Go Back To English, The Locale Doesn't Change Back, Only The Menus Are In English?

Mar 5, 2011

I recently installed language packs for Japanese and changed my system language to it, too. The problem is, now that I try to go back to English, the locale doesn't change back, only the menus are in english. "Apply system wide" in the Language Support didn't do anything; Firefox is in japanese too. Here is my locale output:

LANG=ja_JP.utf8
LANGUAGE=en_US:en
LC_CTYPE="ja_JP.utf8"

[code]....

View 1 Replies View Related

OpenSUSE Install :: Comment On Bad Translations

Nov 3, 2010

I've been using openSUSE for some time now 10.x to 11.3, there is always badly translated things. In this case the timezone shows "Ciudad de Mexico" as "Ciduad de Mjico"Just for the comment, other users could find more stuff in the subject

View 5 Replies View Related

Ubuntu Installation :: Translations Of A Specific Program?

Jan 30, 2010

I installed ubuntu 9.10 in english on a desktop pc. other users of that machine need to use it in other languages, and I was wondering if it is possible to install translations of specific programs like banshee, digikam, etc. and how to do it.

View 1 Replies View Related

Programming :: Bash: Printing The Line Number In Bash Script?

Feb 4, 2011

I would like to know how do I print the line # in a script. My requirement is, I have a script which is about ~5000 lines long. If there are any errors happen I just exit. And I would like to add the line # of the script where the error happened.

View 3 Replies View Related

Programming :: Bash Ctrl+c Tarp And Bash Read With Timeout?

Jan 24, 2010

simple bash code:

Code:
#!/bin/bash
trap "echo 'you got me'" SIGINT SIGTERM # to trap ctrl+c
echo "Press ctrl+c during 5 sec loop"
for ((i=0;i<5;i++)); do

[Code]...

How come code behaves normally and stops when ctrl+c signal is caught and resumes, but after I use at least one timeout read in the code it looks like, if signal is caught again it doesn't pause the execution but skips the loop. If you remove -t (timeout) option from the read, both loops look the same!

View 10 Replies View Related

Programming :: Reading A Bash Variable In Bash Scripting ?

Nov 26, 2008

I have a config file that contains:

my.config:

Code:

Now in my bash script, I want to get the output /home/user instead of $HOME once read. So far, I have managed to get the $HOME variable but I can't get it to echo the variable. All I get is the output $HOME.

Here is my parse_cmd script:

Code:

View 3 Replies View Related

Programming :: Run Multiple Bash And Php Scripts From A Bash Script?

Jul 25, 2011

I have written quite a few separate bash & scripts and php scripts that up to now I have run from cron jobs. However I have to estimate how long each takes to run, before running the next and so it probably takes much longer than necessary to run them all. They have to run in order.

Now there are so many I am thinking it would be better to have a master bash script that would run one after the other, but I am not sure how to get the master script to wait before starting to run the next script. Is this possible and is there a command that will make the script wait between bash and php scripts , for them to finish, before running the next?

View 5 Replies View Related

Programming :: Bash: Get Filename And Extension Using Bash?

Jan 9, 2010

I would like to get the filename (without extension) and the extension separately. The best solution I found so far is:

Let FILE="thefilenameofsomefilesfor_instance.txt"

Code:

NAME=`echo "$FILE" | cut -d'.' -f1`
EXTENSION=`echo "$FILE" | cut -d'.' -f2`

I think it would be better to count the len and remove 3 chars to right to get the extension, but it can be macintosh filenames with have 4 chars for extensions.

View 5 Replies View Related

Programming :: Bash Programming - Rename Files In A Loop?

Mar 31, 2011

I need to rename the resulted searched files from a loopI have the following code:

find . -name DOC* | while read i
do
find $i -type f -name '*.txt'
done

basically, I am searching for all txt files inside any folder starting with DOC name.this code is working fine with me.I need to rename those .txt files to .txtOLDOS: Ubuntu 10.4Bash shell

View 10 Replies View Related

Programming :: Write A Bash Script That Sources Another Bash Script?

Jan 29, 2011

I am trying to write a bash script that sources another bash script. Essentially, I need a few lines to check to see if a certain variable is set. If not, I set it manually, and then source a scripts with that variable in the path. I wrote a test script to try it, but for some reason the last line does not work. Here is what I wrote:

#!/bin/sh
source ~setupdir/setup.shrc #just a test, this line works
echo ${#SETUP} # prints 0 if setup is not set, which it isn't
if [ ${#SETUP} -eq 0 ]
then
SETUP="~setupdir"
fi
echo $SETUP # prints ~setupdir

[Code]...

View 5 Replies View Related

Programming :: Bash Scripting To Programming?

Jul 13, 2011

i'm in the process of learing C++. currently i'm creating shell scripts to get things done. i'm just curious how, as a programmer using C++ you would get a similar job done.as an example i have a script that takes the contents of files, pipes it to some sed and awk commands, which is piped to create a new file. that file is then imported into a mysql database.if you were going to do this in C++, would you call the sed/awk programs to modify the file, or can it be done within the program itself? i'm probably jumping the gun here because i've just started learing about pointers so this is above my ability

View 12 Replies View Related

Ubuntu :: Run Locale From Terminal In 10.10

May 17, 2011

Running locale from terminal gives me:

[Code]...

View 3 Replies View Related

Slackware :: How To Set The System Locale

Mar 4, 2010

Where is the system locale set?When /etc/profile is run it sources /etc/profile.d/lang.sh which sets envar $LANG but /etc/profile is only used by login shells so -- AFAIK -- modifying $LANG in /etc/profile.d/lang.sh will not change the system locale for processes started by the boot scripts.There are no *locale* files under /etc./etc/inittab has nothing about locale.man init has nothing about locale.man 7 locale describes locale.h and its usage.man 5 locale describes the format of locale files./sbin/init (as investigated using the strings command) may call nl_langinfo but man nl_langinfo only describes how to query the locale, not where it is set.

View 6 Replies View Related

Debian Configuration :: Cannot Change Locale

Jul 12, 2015

I have setup a VPS @ Strato with Linux Wheezy.Since I'am in the Netherlands I got a Dutch language package installed.I like to setup into englisch all the way.Via dpkg-reconfigure locales I have installed en_GB.UTF-8 UTF8 language packages and deïnstaled nl_NL.utf8

Generating locales (this might take a while)...
en_GB.UTF-8... done
Generation complete.

But a lot of the commands are still in Dutch like: h2458377:~# uitgelogd.And quite often I got:
-su: warning: setlocale: LC_ALL: cannot change locale (nl_NL.utf8)

How do I get ripped off this error?Just working with/on the command line

View 1 Replies View Related

Ubuntu :: Fix Messed Up Locale Setting?

Dec 22, 2010

Somehow my language/locale setting has gotten messed up, and I don't know how to fix it. Several applications complain with a message like: "No matching locale found for 'C'."

The contents of /etc/default/locale is code...

How can I fix this?

(I'm running 64-bit Ubuntu 10.10 with all updates applied.)

View 9 Replies View Related

General :: Locale Not Supported By C Library?

Jan 31, 2010

When I open gedit and also some other applications, I get this message:(gedit:29595): Gtk-WARNING **: Locale not supported by C library.Using the fallback 'C' locale.Why is this happening and should I worry about it? It does not seem to affect my subsequent work.

View 8 Replies View Related

Slackware :: Using The Esperanto Locale In Xmonad For Sometime?

Apr 29, 2011

I have been having some trouble using the Esperanto locale in Xmonad for sometime. I used this locale mainly in the terminal, because obviously Xmonad is a tiling WM and doesnt need a specific locale itself. I found that Esperanto locale prevents Xmonad from starting, but that if the LANG locale is exported after Xmonad is already started, it will turn my xterminal into an Esperanto terminal. Thus opening mutt mail will show Esperanto-Mutt, and for instance "command not found" becomes "komando ne trovita". I enjoy seeing this.

So the trick then is running "export LANG="eo.utf8"" just after xmonad loads before any other programs are run. I tried various things, and now wonder is it possible to just have the terminal itself running it its own locale? I could run this manually in every terminal, but wonder about automating it. I use the Xfce4-Terminal.

I tried .bash_profile, .xinitrc, .bashrc, and I tried adding the export to a bash script set to run by xmonad after it starts up. None of these cause the desired effect. I also notice it is temporary. If I open a terminal and do the export, that terminal is Esperantized. If I open a new terminal it is back to english.

Another thing I noticed is that after xmonad starts, if I manually add the export to .bashrc, all the terminals are in Esperanto. So I am thinking of making a script that does a find and replace of the .bashrc to add the export. Its tricky, some kind of sed-grep action. Another idea would be to put the .bashrc in a weird location so it isnt found on startup. Then make a command to symlink to it in the user folder after Xmonad starts. The main Slackware system would be English locale in order to prevent Xmonad from barfing on startup.

View 1 Replies View Related

CentOS 5 :: Xwindow - Changing The Locale?

Dec 21, 2010

I run KDE 3.X and for the life of it, can't figure out how to assign the "ALT+SHIFT" to switch between keyboard layouts? The default AL+SHIFT+K switches from EN to second one and after that it (obviously) doesn't work. saw a few posts [URL]....alt-shift.html), but the flag is not changing in the tray.

I also tried to go thru "Keyboard shortcuts", but for whatever reason, it doesn't want to accept the combination of "alt+shift" and expects another key ( i guess).

I'm using Centos 5.2 and the the keyboard model is "MS natural keyboard pro" with US and two Cyrillic layouts - one of them is phonetic.

View 4 Replies View Related

Debian Configuration :: Sorting When Locale Is Set To UTF-8 In Squeeze?

May 6, 2011

I have a problem with sorting when locale is set to UTF-8 in Squeeze. Example:

echo -e "ą
a
b
c

[Code].....

View 8 Replies View Related

Fedora :: Change ONLY The Locale Numeric Configuration?

Feb 11, 2011

I have Fedora 12 on my laptop with locale settings set to spanish-argentina

Code:
locale
LANG=es_AR.UTF-8

[code]....

View 13 Replies View Related

General :: Time - Forcing 24-hour Locale?

Aug 24, 2011

Is there any way to force 24-hour time in my locale (for example, 14:00) instead of 12-hour time (2:00 PM)?

I use the en_US locale with a UTF-8 character set on Arch Linux, but this shouldn't matter, I think.

View 1 Replies View Related

Ubuntu :: Date Format Does Not Follow Locale / Fix It?

Jun 12, 2010

The date displayed in my panel is in the American format: Sat Jun 12, but my locale is set to Australian for everything. I have tried switching to different regions (System->Administration->Language Support), but this appears to have no effect on the date format.

Is this a bug? Anyone know how to fix it? code...

View 8 Replies View Related

Ubuntu :: Push Locale Configuration To A Lot Of Clients?

Sep 1, 2011

I want to ask a question regarding on the "locale" problem. I've searched a lot on Google, but I think there is no detailed information and logic explained this topic well. Someone may suggest use Preference->Administration->Language Support to add or change whatever language I want. I can't use this way beacuse:

1. I need try to push locale configuration to a lot of linux clients.
2. I want to know the detailed information of how to configure.

I have tried to find the most helpful page on the Internet and read some "man locale":

[Code]...

View 2 Replies View Related

General :: Locale Adjustment Not Working As Expected?

May 13, 2011

On Slackware64 13.1 the as-installed en_GB locale gave Sunday as the first day of the week. This was not an issue until Xfce's Orage calendar was used when its display of Sunday as the first day of the week was offputting for someone used to Monday. A minor inconvenience but expected to be easy to fix.

At the command line:
Code:
c@CW8:~$ export LANG=en_GB <== same for en_GB.utf8

[code]....

View 2 Replies View Related

General :: Make Custom 'locale' Files?

Jul 9, 2011

Under Debian "Expert Installation" once I have chosen installation/system language and location, I get an informative notice, that:

Code:
There is no locale defined for the combination of language and country you have selected.

..and I need to choose one locale available for the selected language. As I understand, locale is just a set of environmental variables used by applications and printed out with locale command?

In addition, is it possible to generate own locale files after the installation, which will match my needs?

View 1 Replies View Related

General :: Locale Changed In Various Applications Menu?

Oct 14, 2010

I recently moved from gnome to xfce in my arch linux box. After I added greek to keyboard layout some applications like skype, openoffice and vlc changed their menus in greek characters. English language but greek characters! Anyone got any idea what can I do with this one?

View 1 Replies View Related

General :: Switching Locale(s) To URF-8 In Debian Lenny?

Apr 2, 2010

In accordance with directives - possibly misunderstood - I have reconfigured the Debian "locales" package; I changed the installed locale from en_US.ISO-8859-1 to en_US.UTF-8 and left the default locale for the system as "none". So far so good. In my ".bashrc" file, I have an entry for "LC_LANG".

If this entry is set to "en_US.ISO-8859-1" all my texts are readable on the console but I get warnings like: Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale If I change the LC_LANG entry to "en_US.UTF-8", I no longer get these warnings but the screen-display of Midnight Commander (mc) is a real mess. And even man-pages are no longer able to display hyphens (-) correctly.

View 3 Replies View Related

Server :: SSH Into Particular Directory - Locale Set Back To Default

Jul 20, 2011

So, I wanted to give myself a short cut to not just login to a remote server, but also change into a particular directory once I got there. This was harder than I expected, but this finally worked when I wrapped this up into a shortcut:
ssh -t user@example.com 'cd /var/www/mydir; bash'
And I just alter the directory path to make another shortcut to a different place on the same server. This does work, however, it seems when I log in this way, some of my environment is lost, and my locale is set back to the default "POSIX". That's not good. I'm running Gentoo Linux (amd64).

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved