No announcement yet.

Bootstrapper localized JP messages show corrupted characters

  • Filter
  • Time
  • Show
Clear All
new posts

  • Ulrich
    I tried a several things, but so far I wasn't able to get this working in an easy way. I see that the "Cancel" text is in English by default, even on Japanese Windows.

    Click image for larger version

Name:	SCRN-2016-01-16-02.png
Views:	1
Size:	72.1 KB
ID:	284370

    I tried to use Application.ShowCancelButton(), which allows to set the caption of the Cancel button with any text of your choice - even a string in Japanese from the XML, where you could easily add a MSG_CANCEL string with "キャンセル". The thing is, by default the extraction status is apparently always shown in English, and unless you write your own decompression callback function, it will stay this way - there is no automatic use of the language of the OS, like it happens with the Yes / No buttons as shown in the picture above.

    The description of the callback of the Archive.ExtractFile() can be found in the documentation, but I didn't try to get this working. It may be worth a try, if you really need to have this caption translated. I think that it should be possible with less effort, so I'll be submitting a suggestion - without any promises that this will be implemented any day soon.


    Leave a comment:

  • vasko85
    Thanks a lot, Ulrich. It works like a charm I spent a lot of time trying to find a solution and was starting to think that this will never work. It's probably a good idea to write in the MSI Bootstrapper Help that the bootstrapper can work only with ANSI encoding. I couldn't find such information.
    I have one more question. Is there a way I can localize the "Cancel" button? (in the same dialog from your screenshot above) I was expecting to find the "Cancel" string in the localization file, but it's not there, so I am not sure how the button text is set and if it is hardcoded.


    Leave a comment:

  • Ulrich
    Your file was UTF-8 encoded, and the bootstrapper requires ANSI encoding.
    With a properly encoded file, and running the installer on a system where Japanese was set as the system locale, the translation will show up correctly:

    Click image for larger version

Name:	SCRN-2016-01-14-02.png
Views:	1
Size:	278.6 KB
ID:	284368

    Last edited by Ulrich; 01-14-2016, 12:00 PM.

    Leave a comment:

  • Bootstrapper localized JP messages show corrupted characters


    I created a bootstrapper using the IRMakeBootstrap.exe, which consists of 1 msi file and a .Net4.5.2 offline installer which is a dependency. I want to localize it in Japanese, so I created my own Japanese.xml file with the JP strings, set the description to "Japanese-JP" and the DefaultLCIDS to "1041".
    In the main xml file I am referring this file and the Language is correctly set:

    <LanguageMap DefaultLangId="1041">
    <Language Id="1041" MessagesRef="Japanese"/>
    <Messages Id="Japanese">
    <MessageFileRef Filename="Data\Languages\Japanese.xml"/>

    The bootstrapper exe gets created successfully. So far so good. The problem is that in the generated bootstrapper the JP strings get corrupted. Something like this:
    Original message in the Japanese.xml file - セットアップ ファイルがシステムに抽出されています。少々お待ちください。
    Same message in the generated bootstrapper - 繧サ繝・ヨ繧「繝・・ 繝輔ぃ繧、繝ォ縺後す繧ケ繝・Β縺ォ謚ス蜃コ縺輔l縺ヲ縺・∪縺吶€ょー代€・♀蠕・■縺上□ 縺輔>縲・

    Our localization guys said that this is related to encoding. After some investigation I figured out that JP strings get corrupted in such way when converting UTF-8 to Shift-JIS. I don't know if this is what the IRMakeBootstrap.exe is doing, but no matter of the initial encoding of the Japanese.xml file, it always gets encoded in UTF-8 in the temp folder when creating the actual bootstrapper, so I thought that this might be the case.

    Do you have any idea how to solve this issue?