mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 04:25:39 +01:00
Update LanguagesTable.tsx
This commit is contained in:
parent
2b83a339fe
commit
0c27d28aca
1 changed files with 5 additions and 2 deletions
|
|
@ -11,10 +11,13 @@ export function LanguagesTable({
|
||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
const { locale } = useLocale();
|
const { locale } = useLocale();
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const languageNames = intl.formatDisplayName(locale, { type: 'language' });
|
|
||||||
|
|
||||||
const renderLabel = ({ x }) => {
|
const renderLabel = ({ x }) => {
|
||||||
return <div className={locale}>{languageNames[x?.split('-')[0]] ?? x}</div>;
|
return (
|
||||||
|
<div className={locale}>
|
||||||
|
{intl.formatDisplayName(x?.split('-')[0], { type: 'language' }) ?? x}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue