| Index: chrome/common/extensions/docs/static/i18n.html
|
| ===================================================================
|
| --- chrome/common/extensions/docs/static/i18n.html (revision 27238)
|
| +++ chrome/common/extensions/docs/static/i18n.html (working copy)
|
| @@ -3,7 +3,8 @@
|
| <!-- BEGIN AUTHORED CONTENT -->
|
| <p id="classSummary">
|
| Use the <code>chrome.i18n</code> module to manipulate the i18n related browser
|
| -settings, such as the accept languages.
|
| +settings, such as the accept languages, or to get localized messages for current
|
| +locale.
|
| </p>
|
|
|
| <h3 id="overview-examples">Examples</h3>
|
| @@ -21,4 +22,17 @@
|
| })
|
| }
|
| </pre>
|
| +
|
| +<p>
|
| +The following code gets localized message from the browser and displays it as a
|
| +string. It replaces two placeholders within the message with values arg1 and
|
| +arg2.
|
| +</p>
|
| +
|
| +<pre>
|
| +function getMessage() {
|
| + var message = chrome.i18n.getMessage("click_here", ["arg1", "arg2"]);
|
| + document.getElementById("languageSpan").innerHTML = message;
|
| +}
|
| +</pre>
|
| <!-- END AUTHORED CONTENT -->
|
|
|