Skip to content

Commit

Permalink
Adding PT Language to Locale options
Browse files Browse the repository at this point in the history
This commit will add the support for PT (Portuguese) language to the locale options consumed by the datepicker component.
  • Loading branch information
wilsonrsoler authored Jan 30, 2022
1 parent e9aa1c6 commit ddf8891
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/components/datepicker/locale/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,41 @@ const nl = (): any => {
};
};

const pt = (): any => {
const langName = 'Português';
const monthFullName = [
'Janeiro',
'Fevereiro',
'Março',
'Abril',
'Maio',
'Junho',
'Julho',
'Agosto',
'Setembro',
'Outubro',
'Novembro',
'Dezembro',
];
const shortName = ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'];
const days = ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'];
const daysNames = ['Domingo', 'Segunda-Feira', 'Terça-Feira', 'Quarta-Feira', 'Quinta-Feira', 'Sexta-Feira', 'Sábado'];
const rtl = false;
const ymd = false;
const yearSuffix = '';
return {
months: monthFullName,
monthsAbbr: shortName,
days,
language: langName,
yearSuffix,
ymd,
rtl,
langName,
daysNames,
};
};

export const data = {
af: af(),
hi: hi(),
Expand All @@ -235,4 +270,5 @@ export const data = {
en: en(),
fr: fr(),
nl: nl(),
pt: pt(),
};

0 comments on commit ddf8891

Please sign in to comment.