To download the full code sample see our Code Share site.
The languages that are available during the creation of a transaction, or during the Signer Experience, can be customized. The following languages are available in OneSpan Sign:
Language | Value in the Code |
---|---|
български (Bulgarian) | [bg] |
English (United States) | [en] |
English (United Kingdom) | [en-GB] |
Dansk (Danish) | [da] |
Deutsch (German) | [de] |
Español (América Latina) | [es] |
Español (España) | [es-ES] |
Français (French) | [fr] |
Italiano (Italian) | [it] |
Nederlands (Dutch) | [nl] |
Norsk - Bokmål (Norwegian) | [nb] |
Português (Portuguese) | [pt] |
Polski (Polish) | [pl] |
Română (Romanian) | [ro] |
Pусский (Russian) | [ru] |
Ελληνικά (Greek) | [el] |
中文简体 (Chinese - Simplified) | [zh-CN] |
中文繁體 (Chinese - Traditional) | [zh-TW] |
日本語 (Japanese) | [ja] |
한국어 (Korean) | [ko] |
اللغة العربية (Arabic) Available only in the Signer Experience | [ar] |
Changing a Language at the Transaction Level
To change a transaction's language you must edit the DocumentPackage object. The following code will do this:
DocumentPackage pkg = PackageBuilder.newPackageNamed("Example Package " + System.currentTimeMillis()).withLanguage(Locale.FRENCH).......build();
Note that the language is set on a transaction level. The language will be changed for all recipients in the transaction.
Changing a Language at a Signer Level
You can also change your language settings on a signer level. The following code will do this:
Note that signer level setting will overwrite the transaction level language setting.
Signer signer2 = SignerBuilder.newSignerWithEmail("[email protected]") .withLanguage(Locale.FRENCH) ...... .build();
Results
Here’s an example showing you how to build a transaction while changing both the transaction and signer level language settings.
DocumentPackage superDuperPackage = PackageBuilder.newPackageNamed("Package Language Example").describedAs("This is a package created using the OneSpan Sign SDK").withLanguage(Locale.ENGLISH).withSigner(SignerBuilder.newSignerWithEmail("[email protected]").withFirstName("John").withLastName("Smith").withTitle("Managing Director").withCompany("ABC Bank")).withSigner(SignerBuilder.newSignerWithEmail("[email protected]").withFirstName("Mary").withLastName("Doe").withTitle("Applicant").withCompany("Acme Inc.").withLanguage(Locale.ENGLISH)).withDocument(DocumentBuilder.newDocumentWithName("First Document").fromFile("your_file_path").withSignature(SignatureBuilder.signatureFor("[email protected]").onPage(0).atPosition(100, 100)).withSignature(SignatureBuilder.signatureFor("[email protected]").onPage(0).atPosition(200, 100))).build();
To download the full code sample see our Code Share site.
The languages that are available during the creation of a transaction, or during the Signer Experience, can be customized. The following languages are available in OneSpan Sign:
Language | Value in the Code |
---|---|
български (Bulgarian) | [bg] |
English (United States) | [en] |
English (United Kingdom) | [en-GB] |
Dansk (Danish) | [da] |
Deutsch (German) | [de] |
Español (América Latina) | [es] |
Español (España) | [es-ES] |
Français (French) | [fr] |
Italiano (Italian) | [it] |
Nederlands (Dutch) | [nl] |
Norsk - Bokmål (Norwegian) | [nb] |
Português (Portuguese) | [pt] |
Polski (Polish) | [pl] |
Română (Romanian) | [ro] |
Pусский (Russian) | [ru] |
Ελληνικά (Greek) | [el] |
中文简体 (Chinese - Simplified) | [zh-CN] |
中文繁體 (Chinese - Traditional) | [zh-TW] |
日本語 (Japanese) | [ja] |
한국어 (Korean) | [ko] |
اللغة العربية (Arabic) Available only in the Signer Experience | [ar] |
Changing a Language at the Transaction Level
To change a transaction's language you must edit the DocumentPackage object. The following code will do this:
DocumentPackage pkg = PackageBuilder.NewPackageNamed("Example Package " + System.DateTime.Now) .WithLanguage(new CultureInfo("fr")) ...... .Build();
Note that the language is set on a transaction level. The language will be changed for all recipients in the transaction.
Changing a Language at a Signer Level
You can also change your language settings on a signer level. The following code will do this:
Note that signer level setting will overwrite the transaction level language setting.
Signer signer2 = SignerBuilder.NewSignerWithEmail("[email protected]") .WithLanguage(new CultureInfo("fr")) ...... .Build();
Results
Here’s an example showing you how to build a transaction while changing both the transaction and signer level language settings.
DocumentPackage superDuperPackage = PackageBuilder.NewPackageNamed("Package Language Example") .DescribedAs("This is a package created using the OneSpan Sign SDK") .WithLanguage(new CultureInfo("fr")) .ExpiresOn(DateTime.Now.AddMonths(1)) .WithEmailMessage("This message should be delivered to all signers") .withSigner(SignerBuilder.NewSignerWithEmail("[email protected]") .WithFirstName("John") .WithLastName("Smith") .WithTitle("Managing Director") .WithCompany("ABC Bank")) .withSigner(SignerBuilder.NewSignerWithEmail("[email protected]") .WithFirstName("Mary") .WithLastName("Doe") .WithTitle("Applicant") .WithCompany("Acme Inc.") .WithLanguage(new CultureInfo("fr")) ) .WithDocument(DocumentBuilder.NewDocumentNamed("First Document") .FromFile("your_file_path") .WithSignature(SignatureBuilder.SignatureFor("[email protected]") .OnPage(0) .AtPosition(100, 100)) .WithSignature(SignatureBuilder.SignatureFor("[email protected]") .OnPage(0) .AtPosition(200, 100))) .Build();
To download the full code sample see our Code Share site.
The languages that are available during the creation of a transaction, or during the Signer Experience, can be customized. The following languages are available in OneSpan Sign:
Language | Value in the Code |
---|---|
български (Bulgarian) | [bg] |
English (United States) | [en] |
English (United Kingdom) | [en-GB] |
Dansk (Danish) | [da] |
Deutsch (German) | [de] |
Español (América Latina) | [es] |
Español (España) | [es-ES] |
Français (French) | [fr] |
Italiano (Italian) | [it] |
Nederlands (Dutch) | [nl] |
Norsk - Bokmål (Norwegian) | [nb] |
Português (Portuguese) | [pt] |
Polski (Polish) | [pl] |
Română (Romanian) | [ro] |
Pусский (Russian) | [ru] |
Ελληνικά (Greek) | [el] |
中文简体 (Chinese - Simplified) | [zh-CN] |
中文繁體 (Chinese - Traditional) | [zh-TW] |
日本語 (Japanese) | [ja] |
한국어 (Korean) | [ko] |
اللغة العربية (Arabic) Available only in the Signer Experience | [ar] |
Changing a Language at the Transaction Level
The following request shows you how to build your JSON payload in order to change the language settings at both the transaction level, as well as at the signer level:
HTTP Request
POST /api/packages
HTTP Headers
Accept: application/json Content-Type: multipart/form-data Authorization: Basic api_key
Request Payload
------WebKitFormBoundary1bNO60n7FqP5WO4t Content-Disposition: form-data; name="file"; filename="testDocumentExtraction.pdf" Content-Type: application/pdf %PDF-1.5 %µµµµ 1 0 obj <>>> endobj.... ------WebKitFormBoundary1bNO60n7FqP5WO4t Content-Disposition: form-data; name="payload" { "status": "DRAFT", "language": "fr", "roles": [ { "id": "Signer1", "type": "SIGNER", "signers": [ { "id": "Signer1", "firstName": "John", "lastName": "Smith", "email": "[email protected]" } ], "name": "Signer1" }, { "id": "Signer2", "type": "SIGNER", "signers": [ { "id": "Signer2", "firstName": "Mary", "lastName": "Doe", "email": "[email protected]", "language": "en" } ], "name": "Signer1" } ], "type": "PACKAGE", "name": "Example Package" } ------WebKitFormBoundary1bNO60n7FqP5WO4t--
For a complete description of each field, see the Request Payload table below.
Response Payload
{ "id": "9sKhW-h-qS9m6Ho3zRv3n2a-rkI=" }
Note that the language is set on a transaction level. The language will be changed for all recipients in the transaction.
Request Payload Table
Property | Type | Editable | Required | Default | Sample Values |
---|---|---|---|---|---|
status | string | Yes | No | DRAFT | DRAFT / SENT / COMPLETED / ARCHIVED / DECLINED / OPTED_OUT / EXPIRED |
language | string | Yes | No | en | en / fr / es ... |
type | string | Yes | No | PACKAGE | PACKAGE / TEMPLATE / LAYOUT |
name | string | Yes | No | n/a | Example Package |
roles | |||||
id | string | Yes | No | n/a | Signer1 |
type | string | Yes | No | SIGNER | SIGNER / SENDER |
name | string | Yes | No | n/a | Signer1 |
signers | |||||
string | Yes | Yes | n/a | [email protected] | |
firstName | string | Yes | Yes | n/a | John |
lastName | string | Yes | Yes | n/a | Smith |
id | string | Yes | No | n/a | Signer1 |
language | string | Yes | No | en | en / fr / es ... |
To download the full code sample see our Code Share site.
The languages that are available during the creation of a transaction, or during the Signer Experience, can be customized. The following languages are available in OneSpan Sign:
Language | Value in the Code |
---|---|
български (Bulgarian) | [bg] |
English (United States) | [en] |
English (United Kingdom) | [en-GB] |
Dansk (Danish) | [da] |
Deutsch (German) | [de] |
Español (América Latina) | [es] |
Español (España) | [es-ES] |
Français (French) | [fr] |
Italiano (Italian) | [it] |
Nederlands (Dutch) | [nl] |
Norsk - Bokmål (Norwegian) | [nb] |
Português (Portuguese) | [pt] |
Polski (Polish) | [pl] |
Română (Romanian) | [ro] |
Pусский (Russian) | [ru] |
Ελληνικά (Greek) | [el] |
中文简体 (Chinese - Simplified) | [zh-CN] |
中文繁體 (Chinese - Traditional) | [zh-TW] |
日本語 (Japanese) | [ja] |
한국어 (Korean) | [ko] |
اللغة العربية (Arabic) Available only in the Signer Experience | [ar] |
Changing a Language at the Transaction Level
The sample Apex code below shows you how to edit the Package_x object in order to change the language settings for a transaction:
ESignLiveSDK sdk = new ESignLiveSDK(); //Create package ESignLiveAPIObjects.Package_x pkg = new ESignLiveAPIObjects.Package_x(); pkg.name = 'Test Configure Package Language - ' + Datetime.now().format(); pkg.status = ESignLiveAPIObjects.PackageStatus.DRAFT; pkg.language = 'fr'; //configure package language String packageId = sdk.createPackage(pkg); System.debug('PackageId: ' + packageId);
Note that the language is set on a transaction level. The language will be changed for all recipients in the transaction.