Twain.Initialize
----------------

Initializes the [Twain](component_Twain.md) functions.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Twain](component_Twain.md) | [3.1](newinversion31.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Twain.Initialize"; Country; Language ) 

**MBS**( **"Twain.Initialize";** /\* Initializes the Twain functions. \*/  
**$Country**; /\* The country code.e.g. "USA" \*/   
**$Language**) /\* The language code.e.g. "ENGLISH" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Country | The country code. | "USA" |
| Language | The language code. | "ENGLISH" |

### Result

Returns OK or an error message.

### Description

Initializes the [Twain](component_Twain.md) functions.  
You pass a language and country code to request language settings. Some drivers may ignore that to prefer the system language setting.  
  
Possible Countries: Afghanistan, Algeria, Americansamoa, Andorra, Angola, Anguilla, Antigua, Argentina, Aruba, Ascensioni, Australia, Austria, Bahamas, Bahrain, Bangladesh, Barbados, Belgium, Belize, Benin, Bermuda, Bhutan, Bolivia, Botswana, Britain, Britvirginis, Brazil, Brunei, Bulgaria, Burkinafaso, Burma, Burundi, Camaroon, Canada, Capeverdeis, Caymanis, Centralafrep, Chad, Chile, China, Christmasis, Cocosis, Colombia, Comoros, Congo, Cookis, Costarica, Cuba, Cyprus, Czechoslovakia, Denmark, Djibouti, Dominica, Domincanrep, Easteris, Ecuador, Egypt, Elsalvador, Eqguinea, Ethiopia, Falklandis, Faeroeis, Fijiislands, Finland, France, Frantilles, Frguiana, Frpolyneisa, Futanais, Gabon, Gambia, Germany, Ghana, Gibralter, Greece, Greenland, Grenada, Grenedines, Guadeloupe, Guam, Guantanamobay, Guatemala, Guinea, Guineabissau, Guyana, Haiti, Honduras, Hongkong, Hungary, Iceland, India, Indonesia, Iran, Iraq, Ireland, Israel, Italy, Ivorycoast, Jamaica, Japan, Jordan, Kenya, Kiribati, Korea, Kuwait, Laos, Lebanon, Liberia, Libya, Liechtenstein, Luxenbourg, Macao, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta, Marshallis, Mauritania, Mauritius, Mexico, Micronesia, Miquelon, Monaco, Mongolia, Montserrat, Morocco, Mozambique, Namibia, Nauru, Nepal, Netherlands, Nethantilles, Nevis, Newcaledonia, Newzealand, Nicaragua, Niger, Nigeria, Niue, Norfolki, Norway, Oman, Pakistan, Palau, Panama, Paraguay, Peru, Phillippines, Pitcairnis, Pnewguinea, Poland, Portugal, Qatar, Reunioni, Romania, Rwanda, Saipan, Sanmarino, Saotome, Saudiarabia, Senegal, Seychellesis, Sierraleone, Singapore, Solomonis, Somali, Southafrica, Spain, Srilanka, Sthelena, Stkitts, Stlucia, Stpierre, Stvincent, Sudan, Suriname, Swaziland, Sweden, Switzerland, Syria, Taiwan, Tanzania, Thailand, Tobago, Togo, Tongais, Trinidad, Tunisia, Turkey, Turkscaicos, Tuvalu, Uganda, Ussr, Uaemirates, Unitedkingdom, Usa, Uruguay, Vanuatu, Vaticancity, Venezuela, Wake, Wallisis, Westernsahara, Westernsamoa, Yemen, Yugoslavia, Zaire, Zambia, Zimbabwe, Albania, Armenia, Azerbaijan, Belarus, Bosniaherzgo, Cambodia, Croatia, Czechrepublic, Diegogarcia, Eritrea, Estonia, Georgia, Latvia, Lesotho, Lithuania, Macedonia, Mayotteis, Moldova, Myanmar, Northkorea, Puertorico, Russia, Serbia, Slovakia, Slovenia, Southkorea, Ukraine, Usvirginis, Vietnam.  
Language Codes: Dan, Dut, Eng, Fcf, Fin, Frn, Ger, Ice, Itn, Nor, Por, Spa, Swe, Usa, Userlocale, Afrikaans, Albania, Arabic, Arabic\_Algeria, Arabic\_Bahrain, Arabic\_Egypt, Arabic\_Iraq, Arabic\_Jordan, Arabic\_Kuwait, Arabic\_Lebanon, Arabic\_Libya, Arabic\_Morocco, Arabic\_Oman, Arabic\_Qatar, Arabic\_Saudiarabia, Arabic\_Syria, Arabic\_Tunisia, Arabic\_Uae, Arabic\_Yemen, Basque, Byelorussian, Bulgarian, Catalan, Chinese, Chinese\_Hongkong, Chinese\_Prc, Chinese\_Singapore, Chinese\_Simplified, Chinese\_Taiwan, Chinese\_Traditional, Croatia, Czech, Danish, Dutch, Dutch\_Belgian, English, English\_Australian, English\_Canadian, English\_Ireland, English\_Newzealand, English\_Southafrica, English\_Uk, English\_Usa, Estonian, Faeroese, Farsi, Finnish, French, French\_Belgian, French\_Canadian, French\_Luxembourg, French\_Swiss, German, German\_Austrian, German\_Luxembourg, German\_Liechtenstein, German\_Swiss, Greek, Hebrew, Hungarian, Icelandic, Indonesian, Italian, Italian\_Swiss, Japanese, Korean, Korean\_Johab, Latvian, Lithuanian, Norwegian, Norwegian\_Bokmal, Norwegian\_Nynorsk, Polish, Portuguese, Portuguese\_Brazil, Romanian, Russian, Serbian\_Latin, Slovak, Slovenian, Spanish, Spanish\_Mexican, Spanish\_Modern, Swedish, Thai, Turkish, Ukranian, Assamese, Bengali, Bihari, Bodo, Dogri, Gujarati, Haryanvi, Hindi, Kannada, Kashmiri, Malayalam, Marathi, Marwari, Meghalayan, Mizo, Naga, Orissi, Punjabi, Pushtu, Serbian\_Cyrillic, Sikkimi, Swedish\_Finland, Tamil, Telugu, Tripuri, Urdu, Vietnamese.  
  
When FileMaker Pro is used (32 bit), we can of course only see and use devices with 32 bit drivers.  
For FileMaker Server with 64bit, we only see 64bit drivers.  
  
For 64-bit on Windows you can find 64-bit TwainDSM.dll here:  
<https://github.com/twain/twain-dsm>  
### Examples

Initialize for english:

 MBS ("Twain.Initialize"; "USA"; "ENGLISH")  
### See also

- [Java.Initialize](JavaInitialize.md)
- [TAPI.Initialize](TAPIInitialize.md)
- [Twain.IsInitialized](TwainIsInitialized.md)

### Release notes

- **Version 14.4**
    - Improved [Twain.Initialize](https://www.mbsplugins.eu/TwainInitialize.shtml) to return better error messages on Windows.

### Example Databases

- [Mac and iOS/PDFKit/Pictures to PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/PDFKit/Pictures%20to%20PDF.shtml#4ScriptAnchor_)
- [Win Only/Scanning/Twain](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/Scanning/Twain.shtml#2ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 14.4pr3](https://www.mbsplugins.de/archive/2024-08-21/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 24th June 2025

  
[Twain.ImageInfo](TwainImageInfo.md) - [Twain.IsDSEnabled](TwainIsDSEnabled.md)

[HTML Version](TwainInitialize.shtml)