...
Note |
---|
Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70 |
app.t
Description
Returns the translated string of the specified language key.
Basic Example:
|
Parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
key | Yes | string | The language key used to fetch a string. If no string is found for the key, then the key is returned as the string. | |
vars | No | array | An array of variables to use for substitution in your string. For example, if your string is "This %s belongs to %s" and you pass ['Pizza', 'Bob'] for vars, the string returned will be "This Pizza belongs to Bob". | |
count | No | integer | 1 | The integer to use for pluralization. This is used if you provide different forms of your string based on the pluralization. For example, your lang key might define the following ['I have one index', 'I have many indices']. If you pass a value of 1 for vars then the first string will be returned by the translate function, if you pass a value of more than 1, then the second form will be returned. |
...
Various examples of app.t
|