Adding second language in the dictionary in CSPro 8.0

Discussions about CSEntry
Post Reply
Mariovaisman
Posts: 153
Joined: February 11th, 2013, 8:26 am

Adding second language in the dictionary in CSPro 8.0

Post by Mariovaisman »

Hello,
I am developing a cspro application that has to work in two languages. All was fine up to I tried to add the second language in the dictionary.
Up to CSPro version 7.73, to add the second language I used this methodology:
Saved for example
YES|SI 1
NO|NO 2
With the pipe, the label was saved at the same time i both languages, but now in version 8.0, it does not work because the dictionary is saved in Json and no as it was in version 7.
Which is the fast way to add a second language in the dictionary?
Do I have to copy and paste line by line in the second language?
Thanks
Mario
Gregory Martin
Posts: 1947
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Adding second language in the dictionary in CSPro 8.0

Post by Gregory Martin »

The fastest way would be to add your new labels using Dictionary Macros: https://www.csprousers.org/help/CSPro/d ... acros.html

This allows you to specify the labels in a tabular format and paste them in.

However, If you want to modify the .dcf file, you have to modify the labels, which are specified a a JSON array of objects. This is how the label for a single language is specified:

Code: Select all

"labels": [ { "text": "Yes" } ], 
With multiple labels, you have to link each label to a language:

Code: Select all

"labels": [ { "text": "Yes", "language":"EN" },
            { "text": "Si", "language":"ES" } ]
Post Reply