1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 "description": "Use the <code>chrome.i18n</code> infrastructure to implement internationalization across your whole app or extension.",
13 "description": "An ISO language code such as <code>en</code> or <code>fr</code>. For a complete list of languages supported by this method, see <a href='http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languages/internal/languages.cc'>kLanguageInfoTable</a>. For an unknown language, <code>und</code> will be returned, which means that [percentage] of the text is unknown to CLD"
18 "name": "getAcceptLanguages",
20 "description": "Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use $(ref:i18n.getUILanguage).",
26 {"name": "languages", "type": "array", "items": {"$ref": "LanguageCode"}, "description": "Array of LanguageCode"}
35 "description": "Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the <code>getMessage()</code> call is wrong — for example, <em>messageName</em> is not a string or the <em>substitutions</em> array has more than 9 elements — this method returns <code>undefined</code>.",
39 "name": "messageName",
40 "description": "The name of the message, as specified in the <a href='i18n-messages'><code>messages.json</code></a> file."
44 "name": "substitutions",
46 "description": "Up to 9 substitution strings, if the message requires any."
51 "description": "Message localized for current locale."
55 "name": "getUILanguage",
58 "description": "Gets the browser UI language of the browser. This is different from $(ref:i18n.getAcceptLanguages) which returns the preferred user languages.",
62 "description": "The browser UI language code such as en-US or fr-FR."
66 "name": "detectLanguage",
69 "description": "Detects the language of the provided text using CLD.",
75 "description": "User input string to be translated."
84 "description": "LanguageDetectionResult object that holds detected langugae reliability and array of DetectedLanguage",
86 "isReliable": { "type": "boolean", "description": "CLD detected language reliability" },
90 "description": "array of detectedLanguage",
94 "description": "DetectedLanguage object that holds detected ISO language code and its percentage in the input string",
99 "$ref": "LanguageCode"
104 "description": "The percentage of the detected language"