Question regarding traduction with JSON files

Hi,

So I'm new here and I would like your help with this system of translation.

I have a website that uses JSON files to translate the words/sentences. Currently, the translations are available in french and english and the local code of my files are "fr-FR" and "en-US".

The format of my JSON files is very simple:

{

  "Name": "Name",

  "Apple": "Apple",

  "Orange": ""

}

I want to translate the key of the JSON file and not the value. When the value is empty, SDL studio doesn't propose me to translate it and it's a problem. I wonder if there is a solution for this.

Secondly, I wanna know if that's possible to not have a language as reference since both french and english has to be translated and we translate the name of the property that we give to our page.

If I put French as reference language then I can't translate french JSON file that has to be translated.

Thanks

Parents Reply
  • Is it enough clear? ^^'

    Yes.

    If a key already has already a translation, that means there is something in the value, so when I open the file for translating there should be the key on the left side and the translation on the right side.

    This is not possible on the basis of you having the key on the left and the translated value on the right. The solution I gave you earlier will only allow you to translate the key as a monlingual file.  So the result will be a new file with a translated key but the actual translated content will be exactly the same as it was before translation.  Studio doesn't have a bilngual text filetype... I wish it did.

    A possible solution would be to use the Bilingual Excel filetype instead.  If you import into Excel (based on your simple example) and use colon as the delimiter you get this:

    Excel spreadsheet showing JSON structure with keys in column A and values in column B, including 'Name', 'Apple', and 'Orange'.

    Now open in Studio with these settings:

    Trados Studio options menu with selected file type settings for Bilingual Excel showing tag verification and path rules.

    Looks like this in Studio:

    Trados Studio interface displaying the translation of keys on the left and translated content on the right in a table format.

    Now you have the key on the left and the translated content on the right.  Translate the files, save the target to get a translated Excel file and then reverse the process to get your JSON file back.

    Bit of a workaround... maybe someone else has a better idea.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 9:34 PM (GMT 0) on 28 Feb 2024]
Children
No Data