Skip to content
Snippets Groups Projects
Select Git revision
  • 78175819efb58ae4a4301ae4fde6765f8e294eb7
  • main default protected
  • demo protected
  • master
  • icon-set-mapping
  • production protected
  • revert-62666d1a
  • favorites-and-recent-files
  • lit2
  • wc-part
  • mark-downloaded-files
  • feature/annotpdf-test
  • fix-zip-upload
  • config-cleanup
  • wip
  • app-shell-update
16 results

i18n.js

  • i18n.js 484 B
    import {createInstance} from '@dbp-toolkit/common/i18next.js';
    
    import de from './i18n/de/translation.json';
    import en from './i18n/en/translation.json';
    
    const i18n = createInstance({en: en, de: de}, 'de', 'en');
    
    export function createI18nInstance () {
        return i18n.cloneInstance();
    }
    
    /**
     * Dummy function to mark strings as i18next keys for i18next-scanner
     *
     * @param {string} key
     * @returns {string} The key param as is
     */
    export function i18nKey(key) {
        return key;
    }