Asterisk func language

Synopsis:

Gets or sets the channel's language.

Description:


LANGUAGE()

Gets or sets the channel language. This information is used for the syntax in generation of numbers, and to choose 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'. For some language codes, changing the language also changes the syntax of some Asterisk functions, like SayNumber.

Notes

  • This function may be both read from and written to.
  • This function is deprecated in Asterisk 1.2 and removed in Asterisk 1.4. Use CHANNEL(language) instead.
  • In 1.2, LANGUAGE() has a maximum length of 20 characters, including the terminating NULL.

Return value

Returns the current language code.

Example

exten => s,1,Set(foo=${LANGUAGE()})

exten => s,1,Set(LANGUAGE()=fr)

See also


Synopsis:

Gets or sets the channel's language.

Description:


LANGUAGE()

Gets or sets the channel language. This information is used for the syntax in generation of numbers, and to choose 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'. For some language codes, changing the language also changes the syntax of some Asterisk functions, like SayNumber.

Notes

  • This function may be both read from and written to.
  • This function is deprecated in Asterisk 1.2 and removed in Asterisk 1.4. Use CHANNEL(language) instead.
  • In 1.2, LANGUAGE() has a maximum length of 20 characters, including the terminating NULL.

Return value

Returns the current language code.

Example

exten => s,1,Set(foo=${LANGUAGE()})

exten => s,1,Set(LANGUAGE()=fr)

See also


Created by: murf, Last modification: Fri 27 of Jun, 2008 (23:13 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+