Asterisk cmd SetLanguage

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

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

Created by: oej, Last modification: Tue 10 of Jun, 2008 (11:36 UTC) by JustRumours
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+