NEW [WIP] Add localization support with jekyll-simple-i18n #1509

Open
jonah wants to merge 76 commits from i18n-simple into master
Showing only changes of commit 718a52be07 - Show all commits

View File

@@ -15,6 +15,16 @@ module Jekyll
translated_string.nil? ? text : translated_string.strip
end
end
def translate_page(page)
page_language = @context.environments.first["page"]["language"]
site = @context.registers[:site]
if page_language.nil?
page
else
"/#{page_language}#{page}"
end
end
end
end