From eadbc722bb79f764be44bb07be07b0e712303553 Mon Sep 17 00:00:00 2001 From: breucode Date: Fri, 15 Jan 2021 21:50:30 +0100 Subject: [PATCH] Implement translation for headings --- exampleSite/config.toml | 1 + i18n/de.toml | 20 ++++++++++++++++++++ i18n/en.toml | 20 ++++++++++++++++++++ layouts/partials/_diplomas.html | 2 +- layouts/partials/_education.html | 2 +- layouts/partials/_experience.html | 2 +- layouts/partials/_interests.html | 2 +- layouts/partials/_languages.html | 2 +- layouts/partials/_profile.html | 2 +- layouts/partials/_skills.html | 2 +- 10 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 i18n/de.toml create mode 100644 i18n/en.toml diff --git a/exampleSite/config.toml b/exampleSite/config.toml index fbbfcc4..c71d98e 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,5 +1,6 @@ baseURL = "https://example.com/" languageCode = "en-us" +defaultContentLanguage = "en" theme = "almeida-cv" title = "Example - CV" diff --git a/i18n/de.toml b/i18n/de.toml new file mode 100644 index 0000000..9679b5f --- /dev/null +++ b/i18n/de.toml @@ -0,0 +1,20 @@ +[profile] +other = "Profil" + +[experience] +other = "Erfahrung" + +[education] +other = "Bildung" + +[skills] +other = "Skills" + +[languages] +other = "Sprachen" + +[diplomas] +other = "Zertifizierungen" + +[interests] +other = "Interessen" diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..86833ae --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,20 @@ +[profile] +other = "Profile" + +[experience] +other = "Experience" + +[education] +other = "Education" + +[skills] +other = "Skills" + +[languages] +other = "Languages" + +[diplomas] +other = "Diplomas" + +[interests] +other = "Interests" diff --git a/layouts/partials/_diplomas.html b/layouts/partials/_diplomas.html index 1e945fe..15f2f89 100644 --- a/layouts/partials/_diplomas.html +++ b/layouts/partials/_diplomas.html @@ -1,7 +1,7 @@ {{ if .Site.Data.content.Diplomas }}
-

Diplomas

+

{{ i18n "diplomas" }}

    diff --git a/layouts/partials/_education.html b/layouts/partials/_education.html index 717307a..f5021dd 100644 --- a/layouts/partials/_education.html +++ b/layouts/partials/_education.html @@ -2,7 +2,7 @@

    - Education + {{ i18n "education" }}

    diff --git a/layouts/partials/_experience.html b/layouts/partials/_experience.html index 2217e2b..e801a3b 100644 --- a/layouts/partials/_experience.html +++ b/layouts/partials/_experience.html @@ -1,7 +1,7 @@ {{ if .Site.Data.content.Experience }}
    -

    Experience

    +

    {{ i18n "experience" }}

    diff --git a/layouts/partials/_interests.html b/layouts/partials/_interests.html index 739ed57..cc09bb6 100644 --- a/layouts/partials/_interests.html +++ b/layouts/partials/_interests.html @@ -1,7 +1,7 @@ {{ if .Site.Data.content.Interests }}
    -

    Interests

    +

    {{ i18n "interests" }}

      diff --git a/layouts/partials/_languages.html b/layouts/partials/_languages.html index 89efa9e..1ef2c44 100644 --- a/layouts/partials/_languages.html +++ b/layouts/partials/_languages.html @@ -1,7 +1,7 @@ {{ if .Site.Data.content.Languages }}
      -

      Languages

      +

      {{ i18n "languages" }}

        diff --git a/layouts/partials/_profile.html b/layouts/partials/_profile.html index 65b34aa..d394108 100644 --- a/layouts/partials/_profile.html +++ b/layouts/partials/_profile.html @@ -1,7 +1,7 @@ {{ if .Site.Data.content.Profile }}
        -

        Profile

        +

        {{ i18n "profile" }}

        {{.Site.Data.content.Profile | safeHTML }}

        diff --git a/layouts/partials/_skills.html b/layouts/partials/_skills.html index 8cdb62f..676aaf3 100644 --- a/layouts/partials/_skills.html +++ b/layouts/partials/_skills.html @@ -1,7 +1,7 @@ {{ if .Site.Data.content.Skills }}
        -

        Skills

        +

        {{ i18n "skills" }}