Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Side by Side Diff: chrome/test/data/extensions/samples/i18n/toolstrip.html

Issue 225009: Implementing chrome.i18n.getMessage call, that loads message from the extensi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!-- 1 <!--
2 Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 2 Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
3 source code is governed by a BSD-style license that can be found in the 3 source code is governed by a BSD-style license that can be found in the
4 LICENSE file. 4 LICENSE file.
5 --> 5 -->
6 6
7 <html> 7 <html>
8 <head> 8 <head>
9 <script> 9 <script>
10 function init() {
11 document.getElementById("languageSpan").innerHTML =
12 chrome.i18n.getMessage("click_here");
13 }
14
10 function getAcceptLanguages() { 15 function getAcceptLanguages() {
11 chrome.i18n.getAcceptLanguages(function(languageList) { 16 chrome.i18n.getAcceptLanguages(function(languageList) {
12 var languages = languageList.join(","); 17 var languages = languageList.join(",");
13 document.getElementById("languageSpan").innerHTML = languages; 18 document.getElementById("languageSpan").innerHTML =
19 chrome.i18n.getMessage("chrome_accept_languages", languages);
14 }) 20 })
15 } 21 }
16 </script> 22 </script>
17 </head> 23 </head>
18 <body> 24 <body onload="init()">
19 <div class="toolstrip-button" onclick="getAcceptLanguages();"> 25 <div class="toolstrip-button" onclick="getAcceptLanguages();">
20 <span id="languageSpan">GetAcceptLanguage</span> 26 <span id="languageSpan"></span>
21 </div> 27 </div>
22 </body> 28 </body>
23 </html> 29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698