{"__v":1,"_id":"57f25eb387297b2000427576","category":{"__v":65,"_id":"551546edbc466623002afe72","pages":["551549c0bc466623002afe76","55154afbc859ac2f0001b486","55154daec859ac2f0001b48b","55154f36bc466623002afe7c","551550c5e68daa2f00cff84c","551551d4f854a31900368737","551552e7c859ac2f0001b494","551be4e3a0ee622b0087f69e","5527acc447b71d0d0044e6cd","552f84ad633a5b0d00e99daf","5537533df162750d00bbf7d0","554b3ffd6b448d0d00646d79","55506416fa289c0d0075e4f0","5550aaea00420e0d00d13113","55545865b450630d00041d80","55546906f9a7871700ef8e3c","555c4bf87e271d0d00f3c8c4","5564318c1fa8002300ea4bb0","556ffbd5910c090d00c432b6","557019f4cc189a21001ab258","55703aefcc189a21001ab2a3","5575a3c60b81dc230069c910","558ab69575eaf50d004e4cf3","55b0b41fb3171b3700b1539a","55ba2e48d72d1e1900276ac1","55ba45c804775a2f00628101","55c0b789344dc40d00f55933","55c0b8c837298d0d00088d88","55c0c095344dc40d00f55960","55d43e05b49ab11900328e2e","55d72c8c60fc730d00fc2738","55e6c564d678ad17001589ac","55e9b7780c9b420d0042b275","55f7cf2de32e9b0d00a2d4b6","56094efea7b2590d0089eb95","5613cdbeecbebc21003fa179","5613d8de6a092921004c30b8","5613de7c443514170060dbb6","5613e02823ecf6350009eefc","5613e4271db46e2100e142ad","5614d73c8113d20d00082e3e","561e11ae50e0a62100955946","561e2008efcf8217003adf77","5620f184b244890d001868e0","5620feb740e2c30d0002a899","562105ce40e2c30d0002a8a3","56210b3340e2c30d0002a8b3","56210c74b244890d0018690e","56249a0372ac510d00e49149","56249df185a31117001c53de","56249f0c85a31117001c53e1","5624a9e7c4bf501700bc5ec8","5624b29806e8040d005ed6a0","562507435a86b42300946324","563877854bfb360d00a463c1","5639e0f91846790d0089529a","565327d17d29410d004a0835","565457df04feff210074b17d","56545821ec189235002967af","565485099c4c6d0d00aeda02","5666f1f1f672550d000851ad","566abc7b74d574170070b700","566ad3c7c7c3cd1700265d14","566aede7b5ccc20d00817f71","566aef3147ebaf1900fe65d6"],"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-03-27T12:02:53.314Z","from_sync":false,"order":9,"slug":"advanced-tutorials","title":"Advanced tutorials"},"parentDoc":null,"project":"54eb50e5615ffc1900305a16","user":"54eb4fdedf7add210007b29b","version":{"__v":18,"_id":"54eb63b859b1172100334fae","forked_from":"54eb63a1867e1917009b711d","project":"54eb50e5615ffc1900305a16","createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-10-03T13:35:47.814Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":true,"order":5,"body":"In your SMS business usage, you might have noticed that if your text contains characters specific to your country’s alphabet, the number of remaining SMS characters can drop significantly. This can cause longer messages to be split into two, or more, separate messages which will double or even triple the cost of reaching your customer.\n\nBy using standard encoding for GSM messages, the **7-bit default alphabet**, you can fit **160 characters** in a single SMS message. Here is a list of allowed characters displayed as **Basic Character Set** (left) and **Basic Character Set Extension** (right).\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/f4d8b70-charset1.PNG\",\n        \"charset1.PNG\",\n        710,\n        327,\n        \"#e7e7e5\"\n      ],\n      \"caption\": \"7-bit default alphabet\"\n    }\n  ]\n}\n[/block]\nIf you include even a single character which is not supported in default alphabet all message characters will be encoded by the different standard which will cause a maximum number of characters to drop at **only 70** per message! If the message is longer than 70 characters it will be divided into two parts, where the second message will also be limited to 70 characters, even if the second message contains only basic GSM alphabet. Same rules are applied every consequent message part.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Message encoding\",\n  \"body\": \"We will not get into message encoding details in this tutorial. If you wish to learn more about the subject, visit [this page](https://en.wikipedia.org/wiki/GSM_03.38).\"\n}\n[/block]\nIf you need to handle special characters in your SMS messages, there are two main approaches that can be taken in order to increase character capacity closer to standard SMS size.\n\n**1. Transliteration**\n**2. National Language Identifier (NLI)** \n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Transliteration is a technique by which the system replaces illegal characters with related or similar legal characters from the default alphabet. Transliteration is covered in detail in [this tutorial](/docs/transliteration).\",\n  \"title\": \"Transliteration\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"National Language Identifier\"\n}\n[/block]\nNational Language Identifier (NLI) is an encoding technology which allows an SMS containing language specific characters usually treated as [16bit Unicode](doc:unicode-messages) to be delivered as original text, while only deducting 5 characters from the maximum SMS length – **155 characters allowed**. Remaining 5 characters are used in the background to instruct the receiver's device about the selected language and how to properly display it on screen.\n\nBy sending [Fully featured textual message](doc:fully-featured-textual-message) and setting **`languageCode`** parameter you can send your language specific characters. Supported languages are:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Language code\",\n    \"h-1\": \"Language\",\n    \"0-0\": \"TR\",\n    \"0-1\": \"Turkish\",\n    \"1-0\": \"ES\",\n    \"1-1\": \"Spanish\",\n    \"2-0\": \"PT\",\n    \"2-1\": \"Portuguese\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\nIn this example message containing Turkish alphabet will be sent.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /sms/1/text/advanced HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\n\\n{\\n   \\\"messages\\\":[\\n      {\\n         \\\"from\\\":\\\"InfoSMS\\\",\\n         \\\"destinations\\\":[\\n            {\\n               \\\"to\\\":\\\"41793026727\\\"\\n            }\\n         ],\\n         \\\"text\\\":\\\"Artık Ulusal Dil Tanımlayıcısı ile Türkçe karakterli smslerinizi rahatlıkla iletebilirsiniz.\\\",\\n         \\\"language\\\":{\\n            \\\"languageCode\\\":\\\"TR\\\"\\n         }\\n      }\\n   ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nHere is a list of supported characters for each of supported languages:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9ac3cc7-charsetTR.PNG\",\n        \"charsetTR.PNG\",\n        711,\n        326,\n        \"#e8e7e5\"\n      ],\n      \"caption\": \"Turkish\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/3f6c1fc-charsetPO.PNG\",\n        \"charsetPO.PNG\",\n        710,\n        326,\n        \"#ebebe9\"\n      ],\n      \"caption\": \"Portuguese\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/cfcb223-charsetSP.PNG\",\n        \"charsetSP.PNG\",\n        711,\n        327,\n        \"#e8e8e6\"\n      ],\n      \"caption\": \"Spanish\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Preview messages before sending!\",\n  \"body\": \"Nonstandard characters may cause messages to encode in Unicode, which can considerably reduce the number of available characters per message. We recommend using [SMS preview](/docs/sms-preview) method to explore all options before sending.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Important:\",\n  \"body\": \"There is a chance that certain networks don't support the **Language feature**,  so we can't guarantee 100% that this functionality will work for all destinations. For example, if message with Turkish language is sent over Chinese provider it might not display properly on recipient's device.\"\n}\n[/block]\n-----------\n#### **Tip:** Try out [SMS transliteration](doc:transliteration) for transliterating messages in different languages.","excerpt":"Crossing SMS language barriers with National Language Identifier for Turkish, Spanish and Portuguese.","slug":"language","type":"basic","title":"SMS language"}

SMS language

Crossing SMS language barriers with National Language Identifier for Turkish, Spanish and Portuguese.

In your SMS business usage, you might have noticed that if your text contains characters specific to your country’s alphabet, the number of remaining SMS characters can drop significantly. This can cause longer messages to be split into two, or more, separate messages which will double or even triple the cost of reaching your customer. By using standard encoding for GSM messages, the **7-bit default alphabet**, you can fit **160 characters** in a single SMS message. Here is a list of allowed characters displayed as **Basic Character Set** (left) and **Basic Character Set Extension** (right). [block:image] { "images": [ { "image": [ "https://files.readme.io/f4d8b70-charset1.PNG", "charset1.PNG", 710, 327, "#e7e7e5" ], "caption": "7-bit default alphabet" } ] } [/block] If you include even a single character which is not supported in default alphabet all message characters will be encoded by the different standard which will cause a maximum number of characters to drop at **only 70** per message! If the message is longer than 70 characters it will be divided into two parts, where the second message will also be limited to 70 characters, even if the second message contains only basic GSM alphabet. Same rules are applied every consequent message part. [block:callout] { "type": "warning", "title": "Message encoding", "body": "We will not get into message encoding details in this tutorial. If you wish to learn more about the subject, visit [this page](https://en.wikipedia.org/wiki/GSM_03.38)." } [/block] If you need to handle special characters in your SMS messages, there are two main approaches that can be taken in order to increase character capacity closer to standard SMS size. **1. Transliteration** **2. National Language Identifier (NLI)** [block:callout] { "type": "info", "body": "Transliteration is a technique by which the system replaces illegal characters with related or similar legal characters from the default alphabet. Transliteration is covered in detail in [this tutorial](/docs/transliteration).", "title": "Transliteration" } [/block] [block:api-header] { "type": "basic", "title": "National Language Identifier" } [/block] National Language Identifier (NLI) is an encoding technology which allows an SMS containing language specific characters usually treated as [16bit Unicode](doc:unicode-messages) to be delivered as original text, while only deducting 5 characters from the maximum SMS length – **155 characters allowed**. Remaining 5 characters are used in the background to instruct the receiver's device about the selected language and how to properly display it on screen. By sending [Fully featured textual message](doc:fully-featured-textual-message) and setting **`languageCode`** parameter you can send your language specific characters. Supported languages are: [block:parameters] { "data": { "h-0": "Language code", "h-1": "Language", "0-0": "TR", "0-1": "Turkish", "1-0": "ES", "1-1": "Spanish", "2-0": "PT", "2-1": "Portuguese" }, "cols": 2, "rows": 3 } [/block] In this example message containing Turkish alphabet will be sent. [block:code] { "codes": [ { "code": "POST /sms/1/text/advanced HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\n\n{\n \"messages\":[\n {\n \"from\":\"InfoSMS\",\n \"destinations\":[\n {\n \"to\":\"41793026727\"\n }\n ],\n \"text\":\"Artık Ulusal Dil Tanımlayıcısı ile Türkçe karakterli smslerinizi rahatlıkla iletebilirsiniz.\",\n \"language\":{\n \"languageCode\":\"TR\"\n }\n }\n ]\n}", "language": "json" } ] } [/block] Here is a list of supported characters for each of supported languages: [block:image] { "images": [ { "image": [ "https://files.readme.io/9ac3cc7-charsetTR.PNG", "charsetTR.PNG", 711, 326, "#e8e7e5" ], "caption": "Turkish" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/3f6c1fc-charsetPO.PNG", "charsetPO.PNG", 710, 326, "#ebebe9" ], "caption": "Portuguese" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/cfcb223-charsetSP.PNG", "charsetSP.PNG", 711, 327, "#e8e8e6" ], "caption": "Spanish" } ] } [/block] [block:callout] { "type": "info", "title": "Preview messages before sending!", "body": "Nonstandard characters may cause messages to encode in Unicode, which can considerably reduce the number of available characters per message. We recommend using [SMS preview](/docs/sms-preview) method to explore all options before sending." } [/block] [block:callout] { "type": "warning", "title": "Important:", "body": "There is a chance that certain networks don't support the **Language feature**, so we can't guarantee 100% that this functionality will work for all destinations. For example, if message with Turkish language is sent over Chinese provider it might not display properly on recipient's device." } [/block] ----------- #### **Tip:** Try out [SMS transliteration](doc:transliteration) for transliterating messages in different languages.