Liking cljdoc? Tell your friends :D

chromex.app.i18n

clj

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 34
* https://developer.chrome.com/apps/i18n
raw docstring

api-tableclj

source

detect-languageclj/smacro

(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/apps/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/apps/i18n#method-detectLanguage.
sourceraw docstring

detect-language*cljs

(detect-language* config text)
source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

get-accept-languagesclj/smacro

(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/apps/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/apps/i18n#method-getAcceptLanguages.
sourceraw docstring

get-accept-languages*cljs

(get-accept-languages* config)
source

get-messageclj/smacro

(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/apps/i18n#property-getMessage-options.

https://developer.chrome.com/apps/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/apps/i18n#property-getMessage-options.

https://developer.chrome.com/apps/i18n#method-getMessage.
sourceraw docstring

get-message*cljs

(get-message* config message-name substitutions options)
source

get-ui-languageclj/smacro

(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/apps/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/apps/i18n#method-getUILanguage.
sourceraw docstring

get-ui-language*cljs

(get-ui-language* config)
source

tap-all-eventsclj/smacro

(tap-all-events chan)

Taps all valid non-deprecated events in chromex.app.i18n namespace.

Taps all valid non-deprecated events in chromex.app.i18n namespace.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close