![]() |
|
|
|
|
|||||||
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| LANG=C not English? | dotancohen | Linux | 4 | 03-11-2008 12:40 AM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-19-2007 09:52 PM |
| export PS1='"\[\033[1;34m\]\T \d | System_Analyst.\[\033[0m\]' | mobile01 | High Level Programming | 6 | 11-30-2006 07:44 AM |
| Where to set the LANG variable | wvdeijk | UNIX for Dummies Questions & Answers | 3 | 03-16-2005 05:25 PM |
| Lang | nhatch | UNIX for Dummies Questions & Answers | 0 | 10-13-2004 08:36 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
How to do 'export LANG=en" Using C
Hi
Could you please help me How to program Linux shell commands using C. I want set Language environment before start a particular application. Example:- export LANG=hi_IN.UTF-8 gedit This will start Localized Hindi( Indian Language) version of the 'gedit', if the Hindi language pack and localized version of 'gedit' installed. But rest of the all applications and GNOME desktop will remain in English as my default language setting is English. This is what I want. How can I program " export LANG=hi_IN.UTF-8 " using C language without going to shell prompt or without using shell script. Please help Ram Das |
| Forum Sponsor | ||
|
|
|
|||
|
To set an environment variable from C, use putenv() or setenv()
As an aside, in the shell, if you only want to set or change the variable for one command but otherwise keep it as it is, the export is superfluous. Code:
LANG=hi_IN.UTF-8 gedit Last edited by era; 04-11-2008 at 09:03 AM. Reason: Shell aside |
| Thread Tools | |
| Display Modes | |
|
|