mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Added helper methods for locales.
This commit is contained in:
parent
ef616cc98d
commit
0a8c06b1f8
4 changed files with 18 additions and 10 deletions
|
|
@ -76,3 +76,11 @@ export const languages = {
|
|||
'tr-TR': { label: 'Türkçe', dateLocale: tr },
|
||||
'uk-UA': { label: 'українська', dateLocale: uk },
|
||||
};
|
||||
|
||||
export function getDateLocale(locale) {
|
||||
return languages[locale]?.dateLocale || enUS;
|
||||
}
|
||||
|
||||
export function getTextDirection(locale) {
|
||||
return languages[locale]?.dir || 'ltr';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue