Files
scratch-gui/src/lib/locale-utils.js
T
chrisgarrity 8d1f64d0bf Get isRtl from scratch-l10n
Also added jsdoc to locale-utils
2018-10-11 15:15:21 -04:00

34 lines
575 B
JavaScript

/**
* @fileoverview
* Utility functions related to localization specific to the GUI
*/
const wideLocales = [
'ab',
'ca',
'de',
'el',
'it',
'ja',
'ja-Hira',
'ko',
'hu',
'ru',
'vi'
];
/**
* Identify the languages where translations are too long to fit in fixed width parts of the gui.
* @param {string} locale The current locale.
* @return {bool} true if translations in this language are too long
*/
const isWideLocale = locale => (
wideLocales.indexOf(locale) !== -1
);
export {
wideLocales,
isWideLocale
};