Automatic conversion of numbers from Arabic digits into Hindi digits (Persian Standard Keyboard)

Hi,

I have a problem with Trados Studio 2017 translating the manuals from English into Persian (Farsi). There's a lot of numbers in them. The numbers have to be localized in the target. That's why I spend so much time just converting the numbers.
I would like to know if there is an automated way to convert "Arabic digits" into "Hindi digits" (Persian Standard Keyboard): 1234567890 into ۱۲۳۴۵۶۷۸۹۰

Thank you

  • Just an idea... you could try working with the Regex AutoSuggest provider which might be helpful depending on the length of your mumbers.  For example, I set up the first 10000 numbers and added them to the provider as variables with this rule:

    Trados Studio screenshot showing a Regex AutoSuggest provider setup with a red error message stating 'File not found'.

    Trados Studio screenshot displaying an empty Regex AutoSuggest provider list with a red error message 'No variables defined'.

    In theory this should allow me to type in the first digit of each group of numbers recognised in hindi and enter them all in a single keystroke.  Sadly I can't figure out how to enter the hindi numbers with my keyboard to test it... so I don't know if it will work.  But I tested the idea using arabic numbers and this worked so I have no reason to think it won't.

    To get the numbers in there I put them directly into here:

    c:\Users\[USERNAME]\AppData\Roaming\Capybara.EditorPlugin.RegexMASProvider\Capybara.EditorPlugin.RegexMASProvider.variables.xml

    You can find them in here if you want to try it?

    Capybara.EditorPlugin.RegexMASProvider.variables.xml

    Just copy over the hindi section to your own file. I'd be curious to know if it works.

    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 8:15 PM (GMT 0) on 28 Feb 2024]
  • Hi Paul,

    thank you.

    Could you please add Persian numbers to the xml file as well, because some numbers are different from the Hindi used for Arabic language. Persian numbers are: ۰۱۲۳۴۵۶۷۸۹ please see attached file.

    Dropdown menu in Trados Studio showing number options with 'Default' selected and a list including 'Arabic (0123456789)', 'Hindi' with numbers in Devanagari script, and 'Farsi' with numbers in Persian script.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 8:15 PM (GMT 0) on 28 Feb 2024]
  • Well... I think the next steps should be these:

    1. You verify that this even works?
    2. You can add these numbers.  I have explained how it works and provided the settings file so you can do whatever you like with this now.

    I have also attached the Excel file I used to construct the XML so this should also help you:

    hindi.xlsx

    It's basically like this:

    Excel spreadsheet with columns labeled A to E, showing rows of data under headers TranslationPairSource and TranslationPairTarget.

    I could not concatenate these because it's not possible to get the Hindi and the arabic in one cell since the Hindi was produced by setting a custom formatting over a copy of the Arabic:

    Excel 'Format Cells' dialog box with 'Custom' category selected, showing a sample of Hindi formatting code in the 'Type' field.

    I then copy pasted the content of the Excel into a decent text editor and removed all the tabs with a little regex (search for \t and replace with nothing at all).  The final result I added into the capybara variables file.

    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 8:15 PM (GMT 0) on 28 Feb 2024]
  • Ok, thank you

    I'll test it out and let you know in the next few days.

  • Hi Paul,

    I saved the file and installed Regex AutoSuggest provider plugin and configured it as the image, but I can't make it work. Even when I'm doing "Show Regex..." it doesn't show nothing. How do I make it work?