Language
When sending out messages in languages that tend to use longer sentences and/or have longer alphabets, you may notice that your remaining word counts are decreasing significantly. This can cause longer messages to be split up in cases where it is not desired, leading to higher delivery costs.
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).
If you include even a single character that is not supported in the default alphabet, all message characters will be encoded in a different standard, which will cause the maximum number of characters to drop to only 70 per message.
If messages are longer than 70 characters, they are divided up into parts, whereby subsequent messages will be limited to 70 characters, even if they contain characters on this chart.
If you need to handle special characters in your SMS messages, two main approaches can be taken to increase character capacity closer to standard SMS sizes.
- Transliteration
- National Language Identifier (NLI)
National Language Identifier
National Language Identifier (NLI) is an encoding technology that allows an SMS containing language-specific characters usually treated as 16bit Unicode to be delivered as the original text, while only deducting 5 characters from the maximum SMS length - 155 characters allowed.
The 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 a fully-featured textual message and setting the languageCode parameter you can send your language-specific characters.
Supported languages and their codes are:
- Turkish (TR)
- Spanish (ES)
- Portuguese (PT)
- AUTODETECT
Here is an example of a message to be sent containing the Turkish alphabet:
POST /sms/1/text/advanced HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/json
{
"messages":[
{
"from":"InfoSMS",
"destinations":[
{
"to":"41793026727"
}
],
"text":"Artık Ulusal Dil Tanımlayıcısı ile Türkçe karakterli smslerinizi rahatlıkla iletebilirsiniz.",
"language":{
"languageCode":"TR"
}
}
]
}
Here is a list of supported characters for each of the supported languages:
Turkish
Portuguese
Spanish
Nonstandard characters may cause messages to encode in Unicode, which can considerably reduce the number of available characters per message. It is strongly recommended to use the SMS preview method to explore all options before sending it.
IMPORTANT
Some networks may not support the Language feature. It is not guaranteed that this functionality will work for all destinations. (E.g., messages sent in Turkish over a Chinese provider may not display properly on the recipient’s device).
SMS Transliteration
Transliteration is a method of replacing special (unsupported) characters with similar or related characters that are part of the default alphabet.
This process ensures that a maximum number of 160 characters per message can still be used in a message instead of only 70 (because of the different encoding standards). The downside of this approach is that the delivered message will look slightly different.
With this method, you can send messages in your preferred alphabet, and they will automatically convert into the appropriately transliterated script. This way, you can use the full capacity of the message text without sending any Unicode characters.
Supported alphabets:
- Turkish
- Greek
- Cyrillic
- Serbian Cyrillic
- Bulgarian Cyrillic
- Central European
- Portuguese
- Colombian
- Baltic
- NON_UNICODE
By specifying the desired output alphabet, some unsupported characters will be converted differently, depending on which character is the most appropriate for the selected language.
IMPORTANT
Any character that is not recognized by the selected language and not part of the default alphabet, will be replaced by (.).
Using NON_UNICODE transliteration message text will be converted from Unicode to GSM charset using all of the available alphabets conversions, leaving unmatched characters replaced with dots (ie. "©™ø- ˆ¨л- ˙˚λ- ∆ƒ∂" will become "..ø- ..l- ..A- ...").
This example shows how to send a transliterated message by adding one of the supported alphabets in the transliteration parameter:
POST /sms/1/text/advanced HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/json
{
"messages":[
{
"from":"InfoSMS",
"destinations":[
{
"to":"41793026727"
}
],
"text":"Ως Μεγαρικό ψήφισμα είναι γνωστή η απόφαση της Εκκλησίας του δήμου των Αθηναίων (πιθανόν γύρω στο 433/2 π.Χ.) να επιβάλει αυστηρό και καθολικό εμπάργκο στα",
"transliteration":"GREEK"
}
]
}
Text sent
Ως Μεγαρικό ψήφισμα είναι γνωστή η απόφαση της Εκκλησίας του δήμου των Αθηναίων (πιθανόν γύρω στο 433/2 π.Χ.) να επιβάλει αυστηρό και καθολικό εμπάργκο στα
Text received
ΩΣ MEΓAPIKO ΨHΦIΣMA EINAI ΓNΩΣTH H AΠOΦAΣH THΣ EKKΛHΣIAΣ TOY ΔHMOY TΩN AΘHNAIΩN (ΠIΘANON ΓYPΩ ΣTO 433/2 Π.X.) NA EΠIBAΛEI AYΣTHPO KAI KAΘOΛIKO EMΠAPΓKO ΣTA
By using transliteration, Greek lower case letters that are not supported in the default alphabet were converted to upper case letters which are supported, as you can see in the table below.
Transliteration may cause unexpected output message text. We recommend using the SMS preview method to explore all options before sending.