How to achieve Japanese localization on Mac OSX?

Questions about Wine on macOS.
Locked
Marvin_Arnold
Level 2
Level 2
Posts: 13
Joined: Fri Sep 11, 2009 6:50 pm

How to achieve Japanese localization on Mac OSX?

Post by Marvin_Arnold »

Hi everybody,

hope this isn't to nooby...

How do I localize my wine (windows) system to japanese? (i.e. correct Kanji/Kana rendering) I found the WineLocale page, but it's for Ubuntu, and the shell commands are quite different, and I'm not that versed with shells amyway...

http://ubuntuforums.org/showthread.php?t=383628

Basically I want to do the same on OSX; maybe there is a page out there explaining everything, but if so, I haven't been able to find it...

Sorry for bothering if the answer is too simple (I wish...)
Thanks!

M:A:
James McKenzie

How to achieve Japanese localization on Mac OSX?

Post by James McKenzie »

Marvin_Arnold wrote:
Hi everybody,

hope this isn't to nooby...

How do I localize my wine (windows) system to japanese? (i.e. correct Kanji/Kana rendering) I found the WineLocale page, but it's for Ubuntu, and the shell commands are quite different, and I'm not that versed with shells amyway...

http://ubuntuforums.org/showthread.php?t=383628

Basically I want to do the same on OSX; maybe there is a page out there explaining everything, but if so, I haven't been able to find it...

Sorry for bothering if the answer is too simple (I wish...)
Thanks!

M:A:

M:A:

Are you attempting to try to run Japanese at the same time you are
running MacOSX in a different language?

This would be something to discuss with Apple.

James McKenzie
Marvin_Arnold
Level 2
Level 2
Posts: 13
Joined: Fri Sep 11, 2009 6:50 pm

Post by Marvin_Arnold »

Actually, I want to test a japanese windows program inside wine. Text rendering inside the program is OK (I seem to have the necessary fonts), but during installation i see only ASCII gibberish. Same with the program's menu and system messages. So troubleshooting on the Windows side is impossible.

I don't want to change my OSX localization, only the Windows (inside wine) localization. (It's wine in Win98 mode, btw) Maybe there's something fundamental about it I just don't see...

Thanks,

M:A:
DaVince
Level 8
Level 8
Posts: 1099
Joined: Wed Oct 29, 2008 4:53 pm

Post by DaVince »

Have you tried running this?
LANG=ja_JP.utf8 wine program.exe

I believe that someone mentioned earlier that this might not work under OSX, but I'm not sure so it's worth a shot.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

DaVince wrote:Have you tried running this?
LANG=ja_JP.utf8 wine program.exe

I believe that someone mentioned earlier that this might not work under OSX, but I'm not sure so it's worth a shot.
It doesn't work on OSX. The system's locale needs to be set to whatever user wants.
James McKenzie

How to achieve Japanese localization on Mac OSX?

Post by James McKenzie »

vitamin wrote:
DaVince wrote:
Have you tried running this?
LANG=ja_JP.utf8 wine program.exe

I believe that someone mentioned earlier that this might not work under OSX, but I'm not sure so it's worth a shot.
It doesn't work on OSX. The system's locale needs to be set to whatever user wants.

I think I know what the OP wants:

The Mac is set to something like American English.

The program to be displayed is Japanese.

I do think this is doable, but the appropriate variables have to be set
before running Wine, just like you do in Linux (or any other UNIX for
that matter).

Davince may be correct in the running, but I don't have a Japanese
program to test this with.

James McKenzie
James McKenzie

How to achieve Japanese localization on Mac OSX?

Post by James McKenzie »

vitamin wrote:
DaVince wrote:
Have you tried running this?
LANG=ja_JP.utf8 wine program.exe

I believe that someone mentioned earlier that this might not work under OSX, but I'm not sure so it's worth a shot.
It doesn't work on OSX. The system's locale needs to be set to whatever user wants.

I just tried this with Wordpad to switch the language to French:

LANG=fr_FR.utf8 wine wordpad

The menus and other items displayed were American English.

Looks like it does not work.

James McKenzie
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: How to achieve Japanese localization on Mac OSX?

Post by vitamin »

James McKenzie wrote:I do think this is doable, but the appropriate variables have to be set before running Wine, just like you do in Linux (or any other UNIX for that matter).
No, according to this code: http://source.winehq.org/source/dlls/ke ... le.c#L2943

It resets "LANG" environment variable with the locale it got from the system. Also see this message from wine-devel: http://www.winehq.org/pipermail/wine-de ... 80062.html
James McKenzie

How to achieve Japanese localization on Mac OSX?

Post by James McKenzie »

vitamin wrote:
James McKenzie wrote:
I do think this is doable, but the appropriate variables have to be set before running Wine, just like you do in Linux (or any other UNIX for that matter).
No, according to this code: http://source.winehq.org/source/dlls/ke ... le.c#L2943

It resets "LANG" environment variable with the locale it got from the system. Also see this message from wine-devel: http://www.winehq.org/pipermail/wine-de ... 80062.html

Correct, vitamin. This makes changing the language for a Mac a real
bother.

I guess it is time to file an RFE to get this updated?

James McKenzie
James McKenzie

How to achieve Japanese localization on Mac OSX?

Post by James McKenzie »

vitamin wrote:
James McKenzie wrote:
I do think this is doable, but the appropriate variables have to be set before running Wine, just like you do in Linux (or any other UNIX for that matter).
No, according to this code: http://source.winehq.org/source/dlls/ke ... le.c#L2943

It resets "LANG" environment variable with the locale it got from the system. Also see this message from wine-devel: http://www.winehq.org/pipermail/wine-de ... 80062.html
Hmmm. The message seems to imply that using LC_MESSAGES would work.
However, it did not. I'll read more on the thread in Wine-devel.

James McKenzie
Charles Davis

How to achieve Japanese localization on Mac OSX?

Post by Charles Davis »

vitamin wrote:
It resets "LANG" environment variable with the locale it got from the system.
Only if it wasn't set to begin with. Ken Thomases mad a big deal about
that when I first submitted my patch.

On that line, you'll notice that the third parameter to setenv() is 0.
That parameter tells the OS not to overwrite the value of LANG if it's
already set.

Chip
Charles Davis

How to achieve Japanese localization on Mac OSX?

Post by Charles Davis »

James McKenzie wrote:
I guess it is time to file an RFE to get this updated?
One was already filed. See http://bugs.winehq.org/show_bug.cgi?id=20377 .

I tried to fix it with that patch, but it was soundly rejected by Ken.
Marvin_Arnold
Level 2
Level 2
Posts: 13
Joined: Fri Sep 11, 2009 6:50 pm

Post by Marvin_Arnold »

Wow! That's a lot of activity I've caused. Hope you are onto something...

Perhaps I should clarify what I tried to do:

- My MacBookPro is set to German
- Take a Program written for Japanese Windows
- run the installer with wine: I get all sorts of gibberish
- by try and error, install program
- run program: in-program text rendering is japanese, program messages (like what I suppose means "Would you really like to quit? Yes/No") are ASCII gibberish

When I try to set the language variable preceding "wine program.exe" as described in this thread, I get:

Code: Select all

Unhandled exception: page fault on read access to 0x0000000c in 32-bit code (0x00414710).
(I've read somewhere that some programs won't even install on non-Japanese systems, which can be fixed in XP by localizing it from System Preferences)

It seems that the method in the link I posted solves that problem, but it is written for Ubuntu, and I don't know enough about Linux to emulate these things on OSX. File structure is different, as are many shell commands...[/code]
Charles Davis

How to achieve Japanese localization on Mac OSX?

Post by Charles Davis »

James McKenzie wrote:
vitamin wrote:
James McKenzie wrote:
I do think this is doable, but the appropriate variables have to be set before running Wine, just like you do in Linux (or any other UNIX for that matter).
No, according to this code: http://source.winehq.org/source/dlls/ke ... le.c#L2943

It resets "LANG" environment variable with the locale it got from the system. Also see this message from wine-devel: http://www.winehq.org/pipermail/wine-de ... 80062.html
Hmmm. The message seems to imply that using LC_MESSAGES would work.
However, it did not. I'll read more on the thread in Wine-devel.
What did you use? If you tacked on a .utf8, then of course it didn't
work! On Mac OS, you have to put a dash between the "UTF" and the "8":
ja_JP.UTF-8. (Or you can type ja_JP.utf-8.) And if you want Shift-JIS,
then you need to tack on a .SJIS: ja_JP.SJIS.

Chip
James McKenzie
Marvin_Arnold
Level 2
Level 2
Posts: 13
Joined: Fri Sep 11, 2009 6:50 pm

Re: How to achieve Japanese localization on Mac OSX?

Post by Marvin_Arnold »

Charles Davis wrote:James McKenzie wrote:
vitamin wrote:
James McKenzie wrote:
No, according to this code: http://source.winehq.org/source/dlls/ke ... le.c#L2943

It resets "LANG" environment variable with the locale it got from the system. Also see this message from wine-devel: http://www.winehq.org/pipermail/wine-de ... 80062.html
Hmmm. The message seems to imply that using LC_MESSAGES would work.
However, it did not. I'll read more on the thread in Wine-devel.
What did you use? If you tacked on a .utf8, then of course it didn't
work! On Mac OS, you have to put a dash between the "UTF" and the "8":
ja_JP.UTF-8. (Or you can type ja_JP.utf-8.) And if you want Shift-JIS,
then you need to tack on a .SJIS: ja_JP.SJIS.

Chip
James McKenzie
Charles, that did the trick! (LANG=ja_JP.SJIS) My wine now talks Japanese!

Thank you very much!
ありがとうごやいます、先生!

M:A:
James McKenzie

How to achieve Japanese localization on Mac OSX?

Post by James McKenzie »

Charles Davis wrote:
James McKenzie wrote:
vitamin wrote:
James McKenzie wrote:

No, according to this code: http://source.winehq.org/source/dlls/ke ... le.c#L2943

It resets "LANG" environment variable with the locale it got from the system. Also see this message from wine-devel: http://www.winehq.org/pipermail/wine-de ... 80062.html

Hmmm. The message seems to imply that using LC_MESSAGES would work.
However, it did not. I'll read more on the thread in Wine-devel.
What did you use? If you tacked on a .utf8, then of course it didn't
work! On Mac OS, you have to put a dash between the "UTF" and the "8":
ja_JP.UTF-8. (Or you can type ja_JP.utf-8.) And if you want Shift-JIS,
then you need to tack on a .SJIS: ja_JP.SJIS.

Chip:

I was trying to use fr_FR.utf-8...

Here is what happened in terminal:

fixme:richedit:ME_HandleMessage EM_GETLANGOPTIONS: stub
fixme:richedit:ME_HandleMessage EM_SETLANGOPTIONS: stub
fixme:richedit:ME_HandleMessage EM_SETEDITSTYLE: stub
fixme:richedit:IRichEditOle_fnSetHostNames stub 0x4a3330 WordPad Document
fixme:richedit:ME_HandleMessage EM_SETTARGETDEVICE doesn't use non-NULL
target devices
fixme:richedit:IRichEditOle_fnInPlaceDeactivate stub 0x4a3330

And the language remained en_US.utf-8 for the program....

James McKenzie
Charles Davis

How to achieve Japanese localization on Mac OSX?

Post by Charles Davis »

James McKenzie wrote:
Charles Davis wrote:
James McKenzie wrote:
vitamin wrote:
Hmmm. The message seems to imply that using LC_MESSAGES would work.
However, it did not. I'll read more on the thread in Wine-devel.
What did you use? If you tacked on a .utf8, then of course it didn't
work! On Mac OS, you have to put a dash between the "UTF" and the "8":
ja_JP.UTF-8. (Or you can type ja_JP.utf-8.) And if you want Shift-JIS,
then you need to tack on a .SJIS: ja_JP.SJIS.

Chip:

I was trying to use fr_FR.utf-8...
Ah, I see.
Here is what happened in terminal:

fixme:richedit:ME_HandleMessage EM_GETLANGOPTIONS: stub
fixme:richedit:ME_HandleMessage EM_SETLANGOPTIONS: stub
fixme:richedit:ME_HandleMessage EM_SETEDITSTYLE: stub
fixme:richedit:IRichEditOle_fnSetHostNames stub 0x4a3330 WordPad Document
fixme:richedit:ME_HandleMessage EM_SETTARGETDEVICE doesn't use non-NULL
target devices
fixme:richedit:IRichEditOle_fnInPlaceDeactivate stub 0x4a3330
That's not enough information. Can you attach a +nls log?

Chip
desu
Newbie
Newbie
Posts: 2
Joined: Sun Jan 03, 2010 6:19 am

Re: How to achieve Japanese localization on Mac OSX?

Post by desu »

Marvin_Arnold wrote:
Charles Davis wrote:James McKenzie wrote:
vitamin wrote: Hmmm. The message seems to imply that using LC_MESSAGES would work.
However, it did not. I'll read more on the thread in Wine-devel.
What did you use? If you tacked on a .utf8, then of course it didn't
work! On Mac OS, you have to put a dash between the "UTF" and the "8":
ja_JP.UTF-8. (Or you can type ja_JP.utf-8.) And if you want Shift-JIS,
then you need to tack on a .SJIS: ja_JP.SJIS.

Chip
James McKenzie
Charles, that did the trick! (LANG=ja_JP.SJIS) My wine now talks Japanese!

Thank you very much!
ありがとうごやいます、先生!

M:A:
Sorry to be a total newbie, but where do you find this setting? user.reg?
Paul Menzel

How to achieve Japanese localization on Mac OSX?

Post by Paul Menzel »

Am Sonntag, den 03.01.2010, 05:20 -0600 schrieb desu:
Marvin_Arnold wrote:
Charles Davis wrote:
James McKenzie wrote: What did you use? If you tacked on a .utf8, then of course it didn't
work! On Mac OS, you have to put a dash between the "UTF" and the "8":
ja_JP.UTF-8. (Or you can type ja_JP.utf-8.) And if you want Shift-JIS,
then you need to tack on a .SJIS: ja_JP.SJIS.
Charles, that did the trick! (LANG=ja_JP.SJIS) My wine now talks Japanese!
Strange, did not they write in the thread not to use LANG but
LC_MESSAGES?
Sorry to be a total newbie, but where do you find this setting? user.reg?
Did you read the link above? These are environment variables. You can
set them in a terminal. `env` will show you which are set and you can
set them using `export`, I think, or setting them in front of the
command.

$ LC_MESSAGES="ja_JP.SJIS" wine start.exe

I cannot test this. But there is plenty of information on the WWW.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://www.winehq.org/pipermail/wine-us ... chment.pgp>
desu
Newbie
Newbie
Posts: 2
Joined: Sun Jan 03, 2010 6:19 am

Re: How to achieve Japanese localization on Mac OSX?

Post by desu »

I see. That wont be possible then since I'm using the Darwine (Wine.app) binary. I wonder if I can edit something in the package to change this environment variables and make it permanent.
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Re: How to achieve Japanese localization on Mac OSX?

Post by doh123 »

desu wrote:I see. That wont be possible then since I'm using the Darwine (Wine.app) binary. I wonder if I can edit something in the package to change this environment variables and make it permanent.
not sure how Mike made his Wine.app launch.. but if it uses its own bash or sh session using your default environment variables without over-writing anything, you can just edit your ~/.bash_profile and add in what you want on all bash sessions.
cychrisho
Newbie
Newbie
Posts: 1
Joined: Mon Nov 04, 2013 6:52 pm

Re: How to achieve Japanese localization on Mac OSX?

Post by cychrisho »

Sorry, complete newbie here. Where do I even input this string of code, I experimented on my own, tried to put it into the DOS prompt in my Wine thing. Also tried Terminal. and now my desktop icons flicker on and off screen without warning. Help. :shock:
ChristopherKK
Newbie
Newbie
Posts: 1
Joined: Sun Apr 19, 2015 11:03 pm

Re: How to achieve Japanese localization on Mac OSX?

Post by ChristopherKK »

I know this thread is old now but is there curing a way to run a japanese app local in wine on a mac?
Locked