Dictionary Macro: Copy Value set

Discussions about tools to complement CSPro data processing
Post Reply
msoni
Posts: 25
Joined: February 19th, 2024, 11:38 am

Dictionary Macro: Copy Value set

Post by msoni »

Hi and greetings
I am using dictionary macros in which i copy value set and it comes in excel. But my application is multi language and i have value sets defined in multiple language separately like English, Hindi, Telugu etc. _EN,_TLG and _HIN as postfix in value sets.

When i do it, I want to do it for one language only which is English, not the remaining languages like TLG or HIN.

Any way of doing it using dictiionary macros?
Version: CSPro 7.7, I am using.
Thanks and Regards
Manoj
justinlakier
Posts: 237
Joined: November 21st, 2022, 4:41 pm

Re: Dictionary Macro: Copy Value set

Post by justinlakier »

Hello,

Yes. When copying valuesets in the Dictionary Macros screen, you just need to uncheck "Include: All Languages", and the Dictionary Macros will only copy the valuesets for the currently selected language.

This only works if you are using Languages as defined by the dictionary. This involves going to Edit -> Languages to define your languages. You can then switch the dictionary's active language with the toolbar, giving the same valueset different labels in different languages. If you are manually creating 3 different valuesets instead of using the dictionary-defined languages, then the dictionary will not be able to distinguish the language in the macros, and you will have to modify this manually.

Hope this helps,
Justin
msoni
Posts: 25
Joined: February 19th, 2024, 11:38 am

Re: Dictionary Macro: Copy Value set

Post by msoni »

Thanks for your reply.

This time i did using valuesets and i will have to do it manually. Will do it.

But which is better way, using dictionary with multiple language or using value set, as per my example,

Any other advantage of using language based dictionary over value sets ?
Thanks again and regards
Manoj
justinlakier
Posts: 237
Joined: November 21st, 2022, 4:41 pm

Re: Dictionary Macro: Copy Value set

Post by justinlakier »

Hello,

Yes, there are other advantages to using a dictionary with multiple languages. It makes it easier to manage the valuesets, since you can just toggle the language to see all of them rather than having to scroll through the dictionary. The item name will stay the same in logic no matter the label change from language to language, which is much easier to work with. It enables the app as a whole to more easily transition when the user changes languages, rather than having something in the logic which detects the language and switches valuesets.

Generally, the only time you would want to create different valuesets for each language instead of applying different languages to the dictionary is if the languages somehow required notably different options. In all other cases where the valuesets in all languages only differ in labels, then it is easier to have a dictionary with multiple languages.

Hope this helps,
Justin
Post Reply