Does customize dgnlib support bilingual?

Hello All,

I created some tools and customized task/menu accordingly. I'd like to know does dgnlib support bilingual? I created two menus right now, chinese and english version. Both menu will show. If MS can hide one menu according to the windows/MS version, it would be prefect. I don't want to create two dgnlib. Thanks a lot.

Parents
  • Hi,

    You may be able to do this using Named Expressions using the value of configuration variable _USTN_LOCALE_LANGUAGE. This uses standard Windows codes, 'en' for english and 'zh-cn' for Chinese (there are other Chinese variations).
    The example illustrated below creates a test with a True/False result depending on the value of _USTN_LOCALE_LANGUAGE.

    Download the linked xml file and import it into the named Expression dialog in your DGNLIB (File > Import XML...)

    /cfs-file/__key/communityserver-discussions-components-files/343321/IsLocaleEn.xml

    Use this Named Expression to control the visibility of the English menu:

    Create and apply a similar Named Expression for 'zh-cn' or the variation that you are using.

    That should work.

    Marc

    Answer Verified By: Changsong Ling 

  • Hello Marc,

    Thanks for your reply. It is very useful.

    I did test as per your example, there are some questions:

    1. I created a variable "MyVariable", the value could be 0/1, True/False(all text string instead of boolean T/F)

    2. The xml link doesn't work so I cannot download it. I created a new one as per the snapshot, and it should works, it can reture the valve of my text variable.

    3. But the visibility test failed by using my named expression. I have tried other existing expression which retures boolean True/False and OK. Even I have revised MyVariable to show True/False(text string) which looks same as the boolean True/False, but failed still. It looks visibility accept boolean True/False only.

    4. To get the boolean True/False, I'd like to know hot to set boolean T/F in variable, or convert it to boolean T/F in named expression as per text value of variable?

    Thanks a lot!

  • which product do you use to create the PineApp.dgnlib? V8i ss* or Connect Edition?

    How do you create them? using ribbon customization dialog? or ?

  • the problem here is that there are 2 ribbon tabs nearly with duplicated names. one is PineApp and another is PineAPP. the deference is the character case. but the program treat ribbon names case insensitive so that we treat one as the base of another. if one tab has base then we don't think it's a customization.

  • I created task/menu in V8i, and ribbon in CE.

    I know one way to create them only. Yes ribbon customization dialog.

    Do you have multiple languages in your CE? If you have, would you please help me to test my assumption?

    My assumption: there is no MS language in V8i, the menu is fully controlled by named expression. But for CE, even the named expression is True, but if the language of the ribbon does not match the language of CE, it won't show neither.

    Thanks a lot. 

  • sorry. I'm answering "BTW, did you notice that there is a "custom" suffixed on my chinese ribbon but not on the english ribbon. Shouldn't them be same?"

    this is because there are two English tabs defined in the PineApp.dgnlib. You side you created two version one of which is for English another is Chinese. but in fact there are three  ribbon tabs defined in the PineApp.dgnlib. two of them are English and with complete duplicate groups but the ribbon tab name is only deferent respect character case. one is PineApp, another is PineAPP.

    if you use keyin "ribbon customizations exportecxml" to export to xml. and delete one duplicate in the xml, then use keyin "ribbon customizations importecxml", the you will see (custom) suffix for the PineApp ribbon tab in the ribbon customization dialog

  • I revised the ribbon many times since it doesn't work, maybe some trash information left...

    As you said there are two english ribbons and one chinese ribbon, there should be problem for the "duplicated" english ribbon. But the result is, the duplicated english ribbon can display as soon as the CE language is EN and the Visibility is True, there is no problem on it. For the "good" chinese ribbon, since there is no CN language in my CE, it cannot display, that's the problem. 

Reply
  • I revised the ribbon many times since it doesn't work, maybe some trash information left...

    As you said there are two english ribbons and one chinese ribbon, there should be problem for the "duplicated" english ribbon. But the result is, the duplicated english ribbon can display as soon as the CE language is EN and the Visibility is True, there is no problem on it. For the "good" chinese ribbon, since there is no CN language in my CE, it cannot display, that's the problem. 

Children