2017-03-01 02:55:12 +00:00
|
|
|
/* @flow */
|
|
|
|
|
|
|
|
declare var config: Object;
|
2017-02-22 17:26:33 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom language detection, just returns the config property if any.
|
|
|
|
*/
|
|
|
|
export default {
|
|
|
|
/**
|
2017-03-01 02:55:12 +00:00
|
|
|
* Does not support caching.
|
|
|
|
*
|
|
|
|
* @returns {void}
|
2017-02-22 17:26:33 +00:00
|
|
|
*/
|
2017-03-01 02:55:12 +00:00
|
|
|
cacheUserLanguage: Function.prototype,
|
2017-02-22 17:26:33 +00:00
|
|
|
|
|
|
|
/**
|
2017-03-01 02:55:12 +00:00
|
|
|
* Looks the language up in the config.
|
2017-02-22 17:26:33 +00:00
|
|
|
*
|
2017-02-23 16:56:25 +00:00
|
|
|
* @returns {string} The default language if any.
|
2017-02-22 17:26:33 +00:00
|
|
|
*/
|
|
|
|
lookup() {
|
|
|
|
return config.defaultLanguage;
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2017-03-01 02:55:12 +00:00
|
|
|
* Name of the language detector.
|
2017-02-22 17:26:33 +00:00
|
|
|
*/
|
2017-03-01 02:55:12 +00:00
|
|
|
name: 'configLanguageDetector'
|
2017-02-22 17:26:33 +00:00
|
|
|
};
|