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.js 536B

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