Upgrade 3CX to v18 and get it hosted free!

Asterisk cmd SetLanguage

Author image

Synopsis:

Sets user language

Description:

SetLanguage(language)

Set the channel language to ‘language’. This information is used for the generation of numbers, and to select a natural language file when available.

For example, if language is set to ‘fr’ and the file ‘demo-congrats’ is requested to be played, if the file ‘fr/demo-congrats’ exists, then it will play that file, and if not will play the normal ‘demo-congrats’.

New Language syntax for Asterisk v1.2

The SetLanguage() command has been deprecated in favour of

Set(LANGUAGE()=language)

(make sure you don’t insert any blanks othewise the console will report that it changed the language, but the default language will still be played)

The LANGUAGE function can also return the currently set language:

Set(MYLANG=${LANGUAGE()})

In an AGI script in asterisk 1.2+ you can do the following:

SET VARIABLE LANGUAGE() fr

That’ll change it to french.

New Language syntax for Asterisk v1.4

The LANGUAGE() function that was introduced in Asterisk 1.2 has been deprecated in 1.4 (and removed in 1.6) in favour of

Set(CHANNEL(language)=<lang>)

Example:
Set(CHANNEL(language)=hu)

See also


Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ


Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.