diff --git a/browser/lib/i18n.js b/browser/lib/i18n.js new file mode 100644 index 00000000..aa2f0a89 --- /dev/null +++ b/browser/lib/i18n.js @@ -0,0 +1,7 @@ +//load package for localization +const i18n = new (require('i18n-2'))({ + // setup some locales - other locales default to the first locale + locales: ['en', 'de', 'fr'] + }); + +export default i18n; \ No newline at end of file diff --git a/browser/main/Detail/InfoPanel.js b/browser/main/Detail/InfoPanel.js index 44b9f09a..629f0b97 100644 --- a/browser/main/Detail/InfoPanel.js +++ b/browser/main/Detail/InfoPanel.js @@ -3,6 +3,7 @@ import React from 'react' import CSSModules from 'browser/lib/CSSModules' import styles from './InfoPanel.styl' import copy from 'copy-to-clipboard' +import i18n from 'browser/lib/i18n' class InfoPanel extends React.Component { copyNoteLink () { @@ -19,7 +20,7 @@ class InfoPanel extends React.Component {
{updatedAt}
-MODIFICATION DATE
+{i18n.__('MODIFICATION DATE')}
{wordCount}
-Words
+{i18n.__('Words')}
{letterCount}
-Letters
+{i18n.__('Letters')}
{storageName}
-STORAGE
+{i18n.__('STORAGE')}
{folderName}
-FOLDER
+{i18n.__('FOLDER')}
{createdAt}
-CREATION DATE
+{i18n.__('CREATION DATE')}
NOTE LINK
+{i18n.__('NOTE LINK')}