--language

Top  Previous  Next

--language string

 

The --language option sets the language that will be used for the TWAIN "Select Source" dialog, and the language used for any diagnostic logs.


The built-in supported languages are as follows:


english

french

spanish

german

italian

dutch

portugeuse_br

 

Example:

 

twainsave --language german


Sets the language to be used as German.  The resulting TWAIN dialog (if a source is selected using the TWAIN dialog) will look similar to this:



 

The language settings are found in the twainresourcestrings_*.txt files in the TwainSave executable folder.


Default Setting:

English




Adjusting the language text


You can adjust the resource text for the "OK", "Cancel" and the "Sources:" text above the list of TWAIN sources by 


  • editing the language text file or
  • creating a new file and specifying the file using the --language command option. 


For the first option, to edit the existing text file:


  • Open the appropriate twainresourcestrings_ file in a text editor.  For example, twainresourcestrings_german.txt is the German text file.
  • Look for the lines starting with the numbers 3001, 3002, 3003.  For example, the lines in the twainresourcestrings_german.txt file with those lines are:


3001 &Wählen

3002 &Abbrechen

3003 Quellen:


Change the text found at one or more these entries (do not remove the leading numbers).  Save the file.


For the second option, to create a new file:

  • Create a new text file in the same folder as the TwainSave.exe executable.  Make sure you use a text editor such as Notepad, Notepad++, or any program that edits plain text, not a word processing program such as Word or similar.
  • In the new text file, create three separate lines, where line 1 starts with the text 3001, line 2 starts with 3002, and line 3 starts with 3003. Make sure there is at least one space after the number entered.
  • For the line starting with 3001, enter the language's "OK" text that will be displayed on the OK button.
  • For the line starting with 3002, enter the language's "Cancel" text that will be displayed on the Cancel button.
  • For the line starting with 3003, enter the language's "Sources" text that will be displayed above the list of TWAIN sources.
  • You can use the `&` preceding a character in the text to enable the "hotkey" or Alt-key shortcut to the buttons in the dialog. For example 3001 &My OK will have Alt-M as the keyboard shortcut for the OK button
  • Save the file.  When saving the file, it must be named with the twainresourcestrings_zzz.txt format, where zzz is any name that makes sense (other than using the existing names such as french).  


The leading `&` is the "hotkey" or Alt-key shortcut to the buttons in the dialog.


So for example, twainresourcestrings_mystrings.txt could contain:


3001 OK

3002 Get out

3003 My Sources


Issuing the following command-line:

twainsave.exe --language mystrings


will give the following results when prompted to select a TWAIN source: