Foreign language display issue in CONNECT

I have migrated from old MDL application to the 64-bit MicroStation Connect environment. However there are still a lot of resources, such as tool dialogs and messages defined in traditional .R format. They were previously localized to multiple languages in MBCS (code-page) format and it worked in their own language platforms because those strings would display properly in non-Unicode applications if matching OS language settings.

Now, CONNECT is Unicode based application, and mdlResource_loadWString is the ONLY API to get a string from .rsc (we still built a .ma file paired with .dll file). It never read in the string right. I tried to provide .R file in mbcs (flat file), UTF-8, UTF-8 with BOM. None of them worked properly. Each have a different result but all are wrong. I need to see a sample with Asian language (such as Japanese translation) paired and demonstrated how to support localization with the old R files.

Parents
  • Thank you...I am in a pressure to get things to work and I thought there may be people in the community who had the same issue and solution.

  • Hi Peter,

    I tested with Chinese characters in .R file. It seems work fine. I just keep the "flat" character strings in .r file as below:

    MessageList STRINGID_Messages =
    {
        {
        { MSGID_CommandTable,   "Unable to load command table" },
        { MSGID_ListBox,        "列表框 行 %d, 列 %d" },
        }
    };

    The result is as below:



  • Hi ,

    I just wanted to follow up to see if 's response to try modifying the SDK Example (examples\DialogBoxes\DialogBoxDemo) helped you to test and/or resolve this issue.

    If the code you have migrated over is still exhibiting an issue please consider modifying one of these delivered examples that should also perform similarly to YongAn's approach.

         examples\DialogBoxes\myapp\English
         examples\Elements\exampletool\English

    Both SDK examples (and there are more) help to illustrate concepts discussed in the SDK help file (MicroStationAPI.chm) under parent help Topics:  "Dialog Resource Integration" and "Localization and Internationalization Guide".

    Thank you,
    Bob



  • please consider modifying one of these delivered examples that should also perform similarly to YongAn's approach.

    examples\DialogBoxes\myapp\English
    examples\Elements\exampletool\English

    Managing Language Resource Files

    I'd like to mention that the language folder (English in the above example) should be left as-is.  Create a new folder for your language.  For example:

    examples\DialogBoxes\myapp\Japanese
    examples\Elements\exampletool\Japanese

    Set the language specification (langSpec) macro in the bmake file to select the Japanese resources.  Copy the header and resource files from the English folder to the Japanese folder.  Translate those in the Japanese folder.  Now you can choose to build either an English version of your app. or a Japanese version.

    #----------------------------------------------------------------------
    #       The following section builds any translatable resource modules for
    #   the application.
    #----------------------------------------------------------------------
    $(o)$(appName)str.rsc           : $(langSpec)$(appName)str.r    \
                                        $(privateInc)$(appName).h

    I think that stuff is documented in help, but it's easily overlooked in the feverish excitement of development.

     
    Regards, Jon Summers
    LA Solutions

  • You are right, Jon.

    I just tried to test if Chinese character can be displayed correctly in CE. So modified English resource file directly in example DialogBoxDemo.



Reply Children