Configuring Languages
  • 10 Oct 2024
  • 4 Minutes to read
  • Dark
    Light
  • PDF

Configuring Languages

  • Dark
    Light
  • PDF

Article summary

Java SDK.NET SDKREST APIAPEX SDK

Java SDK

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("signer2@example.com")   .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("signer1@example.com").withFirstName("John").withLastName("Smith").withTitle("Managing Director").withCompany("ABC Bank")).withSigner(SignerBuilder.newSignerWithEmail("signer2@example.com").withFirstName("Mary").withLastName("Doe").withTitle("Applicant").withCompany("Acme Inc.").withLanguage(Locale.ENGLISH)).withDocument(DocumentBuilder.newDocumentWithName("First Document").fromFile("your_file_path").withSignature(SignatureBuilder.signatureFor("signer1@example.com").onPage(0).atPosition(100, 100)).withSignature(SignatureBuilder.signatureFor("signer2@example.com").onPage(0).atPosition(200, 100))).build(); 

.NET SDK

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("signer2@example.com")   .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("signer1@example.com")   .WithFirstName("John")   .WithLastName("Smith")   .WithTitle("Managing Director")   .WithCompany("ABC Bank"))   .withSigner(SignerBuilder.NewSignerWithEmail("signer2@example.com")   .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("signer1@example.com")   .OnPage(0)   .AtPosition(100, 100))   .WithSignature(SignatureBuilder.SignatureFor("signer2@example.com")   .OnPage(0)   .AtPosition(200, 100)))   .Build(); 

REST API

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": "signer1@example.com"   }   ],   "name": "Signer1"   },   {   "id": "Signer2",   "type": "SIGNER",   "signers": [   {   "id": "Signer2",   "firstName": "Mary",   "lastName": "Doe",   "email": "signer2@example.com",   "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

email

string

Yes

Yes

n/a

mail32@example.com

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 ...

APEX SDK

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.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence