translatable text in formulas Excel

Hello! Could anyone help me with this?

 

How can I translate formulas in Excel? My file contains things like [[="2. JAARREKENING "&regelblad!F10]] and [[="Hierbij brengt het bestuur rapport uit over de jaarrekening "®elblad!F10&" van "®elblad!F2]]

How can I persuade Studio to make the tekst in between <"> and < "&>?

I cannot write regex yet and I suspect I will need that for this particular project.

 

Kind regards,

Rens

Parents
  • Hello Rens,

    I have had a look at your use case and the relevant Studio file type settings, and unfortunately, I have come to the conclusion that it is currently not possible to include Excel formulas for translation in Trados Studio.

    The only potential solution I could imagine would be to "unformulate" all concerned formulas by preceding them with an apostrophe so they are considered as literal text. I don't know if this can be done in a batch search & replace operation:
    Excel spreadsheet with formulas preceded by an apostrophe to be treated as text in Trados Studio.

    Then define the parts of the formula which don't need to be translated as internal tags in the concerned file type settings. I used the following regular expressions to achieve that, but these might need some tweaking to exactly fit your needs:

    • ^[^"]+?" (from the beginning of the formula until the first quote (included)
    • "&[^"]+"? (from a quote followed by an ampersand [&]character all characters which aren't a quote (and including the next quote if any))

    Trados Studio file type settings dialog showing regular expressions used to define internal tags for non-translatable parts of formulas.

    This leads to the following outcome in Trados Studio which I think should be close to what you want:

    Trados Studio translation results showing parts of formulas tagged and excluded from translation.

     Alternatively, the newly created tags could also be defined as "Exclude" in the advanced settings for each tag which would have the following result in Trados Studio:
    Trados Studio translation results with tags defined as 'Exclude' resulting in those parts not being displayed for translation.

    After translation, you just need to remove the apostrophe to turn the translated text into formulas again.

    I hope this helps. If anything is unclear or if you run into trouble adapting this to your exact case, don't hesitate to et back to me!


    Kind regards and a great end of the week,
    Raphaël

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 4:05 AM (GMT 0) on 5 Mar 2024]
  • Very good, Raphaël!

    A simple search & replace in Excel will make it:

    Find: =

    Replace by: '=

    After translating the spread-sheet in Studio and gerating the target file, you’ll need to delete those apostrophes added, and there is no easy way, as this replacement doesn’t work:

    Find: '=

    Replace by: =

    Again, this doesn’t work!

     

    But this VBA code will make it!

    Sub DeleteApostrophes()

    Dim rCell As Range

    For Each rCell In ActiveSheet.UsedRange

      If rCell.PrefixCharacter = "'" Then

         rCell.Value = rCell.Value

      End If

    Next rCell

    End Sub

Reply Children
No Data