OLD | NEW |
1 <!-- | 1 <!-- |
2 [NOTEs for editors: | 2 [NOTEs for editors: |
3 * Try to be consistent about string vs. message (it's probably not yet). | 3 * Try to be consistent about string vs. message (it's probably not yet). |
4 --> | 4 --> |
5 | 5 |
6 | |
7 <p id="classSummary"> | |
8 An <em>internationalized</em> extension or app | |
9 can be easily | |
10 <em>localized</em> — | |
11 adapted to languages and regions | |
12 that it didn't originally support. | |
13 </p> | |
14 | |
15 <p> | 6 <p> |
16 You need to put all of its user-visible strings into a file | 7 You need to put all of its user-visible strings into a file |
17 named <a href="i18n-messages.html"><code>messages.json</code></a>. | 8 named <a href="i18n-messages.html"><code>messages.json</code></a>. |
18 Each time you add a new locale, | 9 Each time you add a new locale, |
19 you add a messages file | 10 you add a messages file |
20 under a directory | 11 under a directory |
21 named <code>_locales/<em>localeCode</em></code>, | 12 named <code>_locales/<em>localeCode</em></code>, |
22 where <em>localeCode</em> is a code such as | 13 where <em>localeCode</em> is a code such as |
23 <code>en</code> for English. | 14 <code>en</code> for English. |
24 </p> | 15 </p> |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 chrome.i18n.getAcceptLanguages(function(languageList) { | 551 chrome.i18n.getAcceptLanguages(function(languageList) { |
561 var languages = languageList.join(","); | 552 var languages = languageList.join(","); |
562 document.getElementById("languageSpan").innerHTML = languages; | 553 document.getElementById("languageSpan").innerHTML = languages; |
563 }) | 554 }) |
564 } | 555 } |
565 </pre> | 556 </pre> |
566 | 557 |
567 <p> | 558 <p> |
568 For details on calling <code>getAcceptLanguages()</code>, see the | 559 For details on calling <code>getAcceptLanguages()</code>, see the |
569 $ref:[i18n.getAcceptLanguages API reference]. | 560 $ref:[i18n.getAcceptLanguages API reference]. |
570 </p> | 561 </p> |
OLD | NEW |