您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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. };