Use the chrome.i18n infrastructure to implement internationalization across your whole app or extension.
Use the chrome.i18n infrastructure to implement internationalization across your whole app or extension. * available since Chrome 36 * https://developer.chrome.com/extensions/i18n
(detect-language text)
Detects the language of the provided text using CLD.
|text| - User input string to be translated.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - LanguageDetectionResult object that holds detected langugae reliability and array of DetectedLanguage
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/i18n#method-detectLanguage.
Detects the language of the provided text using CLD. |text| - User input string to be translated. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - LanguageDetectionResult object that holds detected langugae reliability and array of DetectedLanguage In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/i18n#method-detectLanguage.
(get-accept-languages)
Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use 'i18n.getUILanguage'.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [languages] where:
|languages| - Array of LanguageCode
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/i18n#method-getAcceptLanguages.
Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use 'i18n.getUILanguage'. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [languages] where: |languages| - Array of LanguageCode In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/i18n#method-getAcceptLanguages.
(get-message message-name)
(get-message message-name substitutions)
(get-message message-name substitutions options)
Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the getMessage() call is wrong — for example, messageName is not a string or the substitutions array has more than 9 elements — this method returns undefined.
|message-name| - The name of the message, as specified in the messages.json file. |substitutions| - Up to 9 substitution strings, if the message requires any. |options| - https://developer.chrome.com/extensions/i18n#property-getMessage-options.
https://developer.chrome.com/extensions/i18n#method-getMessage.
Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the getMessage() call is wrong — for example, messageName is not a string or the substitutions array has more than 9 elements — this method returns undefined. |message-name| - The name of the message, as specified in the messages.json file. |substitutions| - Up to 9 substitution strings, if the message requires any. |options| - https://developer.chrome.com/extensions/i18n#property-getMessage-options. https://developer.chrome.com/extensions/i18n#method-getMessage.
(get-ui-language)
Gets the browser UI language of the browser. This is different from 'i18n.getAcceptLanguages' which returns the preferred user languages.
https://developer.chrome.com/extensions/i18n#method-getUILanguage.
Gets the browser UI language of the browser. This is different from 'i18n.getAcceptLanguages' which returns the preferred user languages. https://developer.chrome.com/extensions/i18n#method-getUILanguage.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.ext.i18n namespace.
Taps all valid non-deprecated events in chromex.ext.i18n namespace.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close