Forum Discussion

JoseVazquez-1's avatar
JoseVazquez-1
Occasional Contributor
8 years ago

Using an external file to test for testing a multilanguage GUI

We have an application that interfaces with the user via a computer screen.  The screen has many software buttons that can be clicked with a mouse. i.e. buttons like START, STOP, SURNAME, etc. 

 

I currently simulate the press of a button with a ‘Click’ function.

 

I intend to verify the contents of the button, which I believe can be done with a ‘Property Checkpoint’.  So far seems simple.

 

The next revision of the software is to include translation of the buttons on the screen into several languages – European and Asian, maybe up to 20 languages.  I think it will be a logistic nightmare to make a .pjs file for each language, and then maintain them all at the same level as changes and updates occur.

 

My thinking is to be able to access an external file (similarly as done with a DB Table with an XCEL or CVS file), that has the translation for every word that I need.

 

I have found a way to access an external file for external text input (with a DB Table), but I have no idea how to do it for a button content (which is I believe a property called ‘WndCaption’).  Does anyone have any suggestions how to access an external file (for the purposes of incorporating various translations) to check  the contents of the displayed text on a screen button?

 

This topic was originally incorrectly posted in section "General Discussions".

 

1 Reply

  • The text caption of the button is simply a string.

     

    So whatever you like really? The code to get the button text/caption is likely to be the same regardless I would imagine. Then you just need something (a flag, global variable or something?) to indicate the language in use. A DB might well be easiest as you head up the columns as language names. So you could easily have the primary key/column being the button name then store all possible language values for each.

     

    Database: https://support.smartbear.com/viewarticle/75176/

     

    Equally, a CSV or Excel file would work just as well.

     

    Excel: https://support.smartbear.com/viewarticle/74555/

     

    I don't do multi-region support. but I do read in data from various external sources. Mainly XLSX, TXT, CSV and SQL files. As well as reading from external SQL DB's. It's straightforward enough really.