diff --git a/Gemfile b/Gemfile index 35bd7fd..997f0d8 100644 --- a/Gemfile +++ b/Gemfile @@ -32,4 +32,5 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] # do not have a Java counterpart. gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] -gem 'jekyll-archives' \ No newline at end of file +gem "jekyll-archives" +gem "jekyll-polyglot" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index d935194..4419a1c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -46,6 +46,8 @@ GEM jekyll (>= 3.6, < 5.0) jekyll-feed (0.17.0) jekyll (>= 3.7, < 5.0) + jekyll-polyglot (1.8.0) + jekyll (>= 4.0, >= 3.0) jekyll-sass-converter (3.0.0) sass-embedded (~> 1.54) jekyll-seo-tag (2.8.0) @@ -111,6 +113,7 @@ DEPENDENCIES jekyll (~> 4.3.3) jekyll-archives jekyll-feed (~> 0.12) + jekyll-polyglot minima (~> 2.5) tzinfo (>= 1, < 3) tzinfo-data diff --git a/_config.yml b/_config.yml index a62e08f..da551e2 100644 --- a/_config.yml +++ b/_config.yml @@ -34,6 +34,7 @@ theme: minima plugins: - jekyll-feed - jekyll-archives + - jekyll-polyglot jekyll-archives: enabled: @@ -42,6 +43,12 @@ jekyll-archives: permalinks: category: '/category/:name/' +# jekyll-polyglot preferences +languages: ["fr", "en"] +default_lang: "fr" +exclude_from_localization: ["javascript", "images", "css", "public"] +parallel_localization: true + # Exclude from processing. # The following items will not be processed, by default. # Any item listed under the `exclude:` key here will be automatically added to diff --git a/_data/en/strings.yml b/_data/en/strings.yml new file mode 100644 index 0000000..2ee0842 --- /dev/null +++ b/_data/en/strings.yml @@ -0,0 +1,7 @@ +hello: "Hello" +greetings: + morning: "Good morning" + evening: "Good evening" +lang_name: English +title: Your awesome title +rss_subscribe: 'subscribe via RSS' \ No newline at end of file diff --git a/_data/fr/strings.yml b/_data/fr/strings.yml new file mode 100644 index 0000000..5b26552 --- /dev/null +++ b/_data/fr/strings.yml @@ -0,0 +1,7 @@ +hello: "Bonjour" +greetings: + morning: "Bon matin" + evening: "Bonsoir" +lang_name: Français +title: Votre magnifique titre +rss_subscribe: 'abonnez-vous par RSS' \ No newline at end of file diff --git a/_includes/footer.html b/_includes/footer.html index db72885..78601ec 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -3,7 +3,7 @@