add pt-br to date/locales
This commit is contained in:
parent
668f0410f8
commit
f79bd11972
|
@ -1,17 +1,20 @@
|
||||||
import { Locale as DFLocale } from 'date-fns';
|
import { Locale as DFLocale } from 'date-fns';
|
||||||
import pl from 'date-fns/locale/pl';
|
import pl from 'date-fns/locale/pl';
|
||||||
import enGB from 'date-fns/locale/en-GB';
|
import enGB from 'date-fns/locale/en-GB';
|
||||||
|
import ptBR from 'date-fns/locale/pt-BR';
|
||||||
import { DEFAULT_LANGUAGE } from '@config/app';
|
import { DEFAULT_LANGUAGE } from '@config/app';
|
||||||
|
|
||||||
export type Locales = {
|
export type Locales = {
|
||||||
pl: DFLocale;
|
pl: DFLocale;
|
||||||
en: DFLocale;
|
en: DFLocale;
|
||||||
|
br: DFLocale;
|
||||||
};
|
};
|
||||||
export type Locale = keyof Locales;
|
export type Locale = keyof Locales;
|
||||||
|
|
||||||
const locales: Locales = {
|
const locales: Locales = {
|
||||||
pl,
|
pl,
|
||||||
en: enGB,
|
en: enGB,
|
||||||
|
br: ptBR,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getLocale = (lang: string): DFLocale => {
|
export const getLocale = (lang: string): DFLocale => {
|
||||||
|
|
Reference in New Issue
Block a user