How to set signer language for an eSignature document using BoldSign API?
BoldSign supports to set language for signers for better understanding and convenience. This article will guide you on how to set language for signers using the API.
You can allow your signers to receive the emails in their preferred language. The currently supported languages are English, German, Spanish, French, Romanian, Norwegian, Bulgarian, Italian, Danish, Polish, Portuguese, Czech, Dutch, Russian, and Swedish. While sending the signature request, all the signer-related transaction emails and signing page static contents will be translated into the signer’s defined language.
You can set signer language by setting signer locale
property and DocumentInfo
locale
property.
Below are a few code examples demonstrating how to set language for signers.
Code snippet
curl -X 'POST' \ 'https://api.boldsign.com/v1/document/send' \ -H 'accept: application/json' \ -H 'X-API-KEY: {Your API Key}' \ -H 'Content-Type: multipart/form-data' \ -F 'Signers={ "name": "David", "emailAddress": "david@cubeflakes.com", "formFields": [ { "id": "string", "fieldType": "Signature", "pageNumber": 1, "bounds": { "x": 100, "y": 100, "width": 100, "height": 20 }, "isRequired": true } ], "locale": "PT" }' \ -F 'Files={Your file path}' \ -F 'DocumentInfo[locale]="PT"' \ -F 'Title=Signer language' \
import requests import json url = "https://api.boldsign.com/v1/document/send" signer_data = { "name": "David", "emailAddress": "david@cubeflakes.com", "signerType": "Signer", "signerRole": "Signer", "formFields": [ { "id": "Signature", "type": "FieldType.Signature", "pageNumber": 1, "bounds": { "x": 100, "y": 100, "width": 200, "height": 100 }, "isRequired": True, } ], "locale": "PT" } headers = { 'accept': 'application/json', 'X-API-KEY': '{your API key}' } payload = { 'Signers': json.dumps(signer_data), 'DocumentInfo': json.dumps({ "locale": "PT", "title": "Sample document", "description": "Please sign the document" }), } files = [ ('Files', ('{Your file name}', open('{Your file path}', 'rb'), 'application/pdf')) ] response = requests.post(url, headers=headers, data=payload, files=files) print(response.text)
const axios = require('axios'); async function GetData(){ try{ const FormData = require('form-data'); const fs = require('fs'); data.append('Files', fs.createReadStream('{Your file path}')); data.append('Signers', '{\r\n "name": "David", \r\n "emailAddress": "david@cubeflakes.com",\r\n "signerType": "Signer",\r\n "formFields": [\r\n {\r\n "id": "Signature",\r\n "Type": "FieldType.Signature", \r\n "pageNumber": 1,\r\n "bounds": {\r\n "x": 100,\r\n "y": 100,\r\n "width": 200,\r\n "height": 200\r\n }, \r\n "isRequired": true\r\n}\r\n ],\r\n "locale": "PT"\r\n}'); data.append('Title', "Sample Document node js"); data.append('DocumentInfo', '{\r\n "locale": "PT",\r\n "title": "Sample Document",\r\n "description": "Please sign this"\r\n }'); let config = { method: 'post', maxBodyLength: Infinity, url: 'https://api.boldsign.com/v1/document/send', headers: { 'accept': 'application/json', 'X-API-KEY': '{Your API Key}', ...data.getHeaders() }, data : data }; const response = await axios.request(config); console.log(JSON.stringify(response.data)); return response.data.documentId; } catch (error) { console.error('Error:', error.message); throw error; // Propagate the error } GetData();
Replace the values (Files, Signers, etc.) with the actual values. Set the Locale
field to your desired language code. Also, provide DocumentInfo
with the necessary information if you want to send the document in different languages other than EN. Upon execution, the document will be created, and a document ID will be generated.