Forum Discussion

googleid_105613's avatar
googleid_105613
Occasional Contributor
12 years ago

TestedApp Foreign Language Support?

Configuration:

TestComplete Enterprise 9.20, WinXP/Win7.  Application is .NET with some MFC DLLs.  Automation code is in JScript.



We're using hardcoded strings for some object recognition, and we'd like to expand to test our application in multiple foreign languages with minimal code changes.  Many of the strings in the application are contained in MFC dlls for each language.  I'm interested to find out how anyone else has handled this, or if anyone knows if I can access an MFC Resource DLL in JScript to read out those values.



Thanks for any suggestions!



Will
  • googleid_105613's avatar
    googleid_105613
    Occasional Contributor
    Sergi,



    You're not interrupting, this is what Forums are for!  Users helping users!



    Here's what I did:

    I have two files that I use for translations.  One contains a tab-delimited dump from Excel of the strings for the languages we support, as well as an ID so we can reference the terms.  It looks kind of like this....



    999 Yes  Oui  Ja  Si



    Another contains a mapping, so we can refer to it in the scripts.  It looks kind of like this...



    Global.Yes, 999



    When our tests start up, they load the "dictionary" into an array.  Our application stores the current language configuration in the registry, so we look there to find out how the application is configured.  We then load up the mapping file, pushing the mapping and the current "definition" of the term into a global array which can be accessed by the scripts.



    It's working pretty well now.
  • googleid_105613's avatar
    googleid_105613
    Occasional Contributor
    I went a different route with the MFC Resource DLL's, and now I've got "dictionaries" of each language our application supports.  I'm now having difficulties getting TestComplete to read Japanese text from the application.  Is there any way to make TestComplete read the Unicode characters from the Title of a window, or the label on a tab,  to aid in object recognition?
  • googleid_105613's avatar
    googleid_105613
    Occasional Contributor
    Also...



    In order to get TestComplete to recognize the Japanese characters, I had to run an internal application that converts the OS to Japanese.  Once I did that, katakana characters appears within TestComplete, and I could use katakana for object recognition.