You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configLanguageDetector.ts 521B

12345678910111213141516171819202122232425262728
  1. declare let config: any;
  2. /**
  3. * Custom language detection, just returns the config property if any.
  4. */
  5. export default {
  6. /**
  7. * Does not support caching.
  8. *
  9. * @returns {void}
  10. */
  11. cacheUserLanguage: Function.prototype,
  12. /**
  13. * Looks the language up in the config.
  14. *
  15. * @returns {string} The default language if any.
  16. */
  17. lookup() {
  18. return config.defaultLanguage;
  19. },
  20. /**
  21. * Name of the language detector.
  22. */
  23. name: 'configLanguageDetector'
  24. };