Multilingual application on Mac OS X

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
SunLight
Level 2
Level 2
Posts: 12
Joined: Thu Feb 28, 2008 11:30 am

Multilingual application on Mac OS X

Post by SunLight »

I have installed wine package from http://thisismyinter.net/?p=29 on Mac OS X v10.5 Leopard. It works, except this http://www.thediction.com/ program don't accept Bulgarian input.
I have successfully use it on Linux with "LANG=bg_BG.CP1251 wine Diction.exe", when that locale is installed. I don't know how to achieve this on Mac. "LANG=bg_BG.UTF8 wine Diction.exe" dos not work, either CrossOver-6.2.1-demo.

Thanks!
mikolajz
Level 2
Level 2
Posts: 20
Joined: Wed Feb 27, 2008 7:18 am

Post by mikolajz »

I don't have a Mac but I guess it have some control panel for regional settings where you can choose the Bulgarian locale. This should work. I don't know if it is possible to change the locale for only one application on a Mac. However, you could also try "LC_ALL=bg_BG wine Diction.exe" or "LC_CTYPE=bg_BG wine Diction.exe". Maybe it will work.
mikolajz
Level 2
Level 2
Posts: 20
Joined: Wed Feb 27, 2008 7:18 am

Post by mikolajz »

I forgot to add, that the correct locale line under most Linux distributions should be LANG=bg_BG.UTF-8 . The last item should be the Linux charset (which is nearly always UTF-8) so that Wine is able to understand e.g. file names with native characters. The Windows charset will be chosen by Wine automatically from the language/contry part (e.g. for Bulgarian it will be CP1251).
SunLight
Level 2
Level 2
Posts: 12
Joined: Thu Feb 28, 2008 11:30 am

Post by SunLight »

mikolajz wrote:I don't have a Mac but I guess it have some control panel for regional settings where you can choose the Bulgarian locale.
There is a list, where to specify preferable interface language of applications.
And keyboard layout switch. Nothing more on the surface. I assume OS X use UTF8 locale, which should be sufficient, but whether "LANG=" work at all ?

I will give it another chance, with this options, very soon.
I forgot to add, that the correct locale line under most Linux distributions should be LANG=bg_BG.UTF-8
Last time I try, only CP1251 work. Looks like my error. I know that LANG=bg_BG.UTF-8 is far more preferable.
SunLight
Level 2
Level 2
Posts: 12
Joined: Thu Feb 28, 2008 11:30 am

Post by SunLight »

It is working! Bulgarian input work with X11's terminal. There is a lot more to do, but I got an idea where is the problem. I'll give more details when find clear solution.
SunLight
Level 2
Level 2
Posts: 12
Joined: Thu Feb 28, 2008 11:30 am

mini How To

Post by SunLight »

Start multilingual application from Apple's Terminal:
1. Start Terminal from Finder menu>Go>Applications>Utilities>Terminal
2. Open Terminal preferences from Terminal menu>Preferences>Settings>Advanced
3. Untick "Set LANG environmet variable on startup". Doing so will make some confusion with non english chars, but this is minor side efect.
4. Now "LANG=xx_YY.UTF-8 /Application/Darwine/Wine.bundle/Contents/bin/wine program.exe" will work.

Better approach using AppleScript:
1. Open Script Editor from Finder menu>Go>Applications>AppleScript>Script Editor
2. Copy & Paste the folowing:

Code: Select all

try
	do shell script "cd ~/programdir; LANG=bg_BG.UTF-8 /Applications/Darwine/Wine.bundle/Contents/bin/wine program.exe"
end try
3. Go to Script Editor menu>Save As... Name it, choose Application from "File Format" menu, untick "Startup Screen". Save it. After that copy it to Applications folder. This will start wine/windows program with one click.

Notes:
It is good idea to tick "Follow system keyboard layout". It is in X11's menu>X11>Preferences>Input. X11 will start with your wine/windows program.
"cd ~/programdir" - this assume that program.exe is installed in programdir, which is located in your home directory. Often going there is required for proper operation. It is important to execute commands with one "do shell script".
"try-end try" block will protect script from any errors, that may (and will) occur.

Special thanks to mikolajz. You motivate me to work on a problem.
Locked