Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>
Add multiple language site config
config.toml | 9 +++++++++ data/meses.yaml | 12 ++++++++++++ data/months.yaml | 12 ++++++++++++ i18n/en.toml | 27 +++++++++++++++++++++++++++ i18n/pt-br.toml | 27 +++++++++++++++++++++++++++
diff --git a/config.toml b/config.toml index f6c6b81dd5d5ae943e90359e2bb8653c8e4ff4a8..05d44d5422f4612893bb73179b5966b5cfa4dd76 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,7 @@ baseURL = "https://porcellis.com/" title = "Pedro Lucas Porcellis" +defaultContentLanguage = "pt-br" languageCode = "pt-br" uglyurls = true pygmentsUseClasses = true @@ -8,3 +9,11 @@ disablePathToLower = true [permalinks] blog = "/:year/:month/:day/:filename" + +[languages] + [languages.pt-br] + weight = 1 + [languages.en] + weight = 2 + title = "Pedro Lucas Porcellis" + diff --git a/data/meses.yaml b/data/meses.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dac340462c58e9acb38f6bad85f8873be541b85a --- /dev/null +++ b/data/meses.yaml @@ -0,0 +1,12 @@ +1: "Janeiro" +2: "Fevereiro" +3: "Março" +4: "Abril" +5: "Maio" +6: "Junho" +7: "Julho" +8: "Agosto" +9: "Setembro" +10: "Outubro" +11: "Novembro" +12: "Dezembro" diff --git a/data/months.yaml b/data/months.yaml new file mode 100644 index 0000000000000000000000000000000000000000..14793ecad3b5c74e3f5126a816cc1d53fcc5b641 --- /dev/null +++ b/data/months.yaml @@ -0,0 +1,12 @@ +1: "January" +2: "February" +3: "March" +4: "April" +5: "May" +6: "June" +7: "July" +8: "August" +9: "September" +10: "October" +11: "November" +12: "December" \ No newline at end of file diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000000000000000000000000000000000000..b610b60f92cfff3f804cb306d9756f63b8164675 --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,27 @@ +[home] +other = "Home" +[notFound] +other = "Page not found" +[goBackHome] +other = "Go back to the homepage" +[tags] +other = "Tags" +[toc] +other = "Table of contents" +[related] +other = "Related readings" +[months] +other = "months" +[published] +other = "{{.Month }} {{.Day}}, {{.Year}}" +[words] +other = "words" +[footer] +other = """ + Comments, questions? Send an email to \ + <a href="mailto:~porcellis/public-inbox@lists.sr.ht"> \ + ~porcellis/public-inbox@lists.sr.ht \ + </a> — my <a href="https://lists.sr.ht/~porcellis/public-inbox"> \ + public inbox \ + </a>. \ + """ diff --git a/i18n/pt-br.toml b/i18n/pt-br.toml new file mode 100644 index 0000000000000000000000000000000000000000..2059416faa342fb5944d6c22eb6b6bf476ca5398 --- /dev/null +++ b/i18n/pt-br.toml @@ -0,0 +1,27 @@ +[home] +other = "Início" +[notFound] +other = "Página não encontrada" +[goBackHome] +other = "Voltar para a página inicial" +[tags] +other = "Palavras chaves" +[toc] +other = "Tabela de conteúdo" +[related] +other = "Leituras relacionadas" +[months] +other = "meses" +[published] +other = "{{.Day}} de {{.Month}} {{.Year}}" +[words] +other = "palavras" +[footer] +other = """ + Comentários, dúvidas? Envie um email para \ + <a href="mailto:~porcellis/public-inbox@lists.sr.ht"> \ + ~porcellis/public-inbox@lists.sr.ht \ + </a> — minha <a href="https://lists.sr.ht/~porcellis/public-inbox"> \ + caixa de entrada pública\ + </a>. \ + """