123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <html>
- <head>
- <script src="./i18next.min.js" ></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/i18next-browser-languagedetector/1.0.1/i18nextBrowserLanguageDetector.min.js" ></script>
- </head>
- <body>
- <div>open console</div>
- <script>
-
-
- i18next
- .use(window.i18nextBrowserLanguageDetector)
- .init({
-
- resources: {
- en: {
- translation: {
- input: {
- placeholder: "a placeholder"
- },
- nav: {
- home: 'Home',
- page1: 'Page One',
- page2: 'Page Two'
- }
- }
- }
- },
- debug: true
- }, function(err, t) {
- console.warn(i18next.t('input.placeholder'));
- console.warn(i18next.t('nav.home'));
- console.warn(i18next);
- });
- </script>
- </body>
- </html>
|