Closed raviriley closed 2 years ago
Spanish has been added by @rbenitezpagan
The Spanish language modification broke backwards compatibility in my repository (forked from the starter-theme). I had to go to an older commit and manually copy over the includes/ .html pages so they would work with my current website, as I customized the names of my sections. I have no problems now, but just figured you would want to know!
Edit: if you want to see the changes I made, they're not in "my" repository, they're in this one: https://github.com/mitharvardwai/mitharvardwai.github.io
The Spanish language modification broke backwards compatibility in my repository (forked from the starter-theme). I had to go to an older commit and manually copy over the includes/ .html pages so they would work with my current website, as I customized the names of my sections. I have no problems now, but just figured you would want to know!
Edit: if you want to see the changes I made, they're not in "my" repository, they're in this one: https://github.com/mitharvardwai/mitharvardwai.github.io
@jackievaleri Thanks for sharing, I have submitted PR (https://github.com/raviriley/agency-jekyll-theme-starter/pull/2) on the template repo.
If you have time please test it, it should work after adding your customization.
Good catch, I forgot to update the template repo. Thanks @jackievaleri for commenting and @rbenitezpagan for the quick fix!
Just to keep references to everything in one place, merged #2 from agency-jekyll-theme-starter.
@jackievaleri does everything work as expected?
Yep, everything is working great for me! Thanks so much for your help!
Great, thanks for the fast responses everyone!
How can you toggle between different languages ? Is this based on the browser locale or how is switching implemented ?
@lumpidu there's a locale
variable on the config file.
@rbenitezpagan: but maybe the user of the website wants to choose the language ?
@lumpidu Oh, I get what you mean now.
It is not "internationalization" is just having multiple languages as part of the theme.
Aha, but could it be made possible (probably not very production-ready ... I know, just to enhance my understanding) like this:
Something like that would be possible @lumpidu. However, you would probably want to set two different configs (so two separate implementations of the theme) so that the domains look something like yoursite.com/en/...
and yoursite.com/OTHER_LOCALE/...
.
@raviriley : understood. Thx. for clarification !
I stumbled upon this as well today and want to clarify it a bit because it took me some time to figure out what was meant by the explanations above. Basically I created separate folders at the top level for the languages (en, de etc.) which only include the index.md. In the index file, just add "locale: en" in the line below "layout: home". Then search and replace "site.locale" for "page.locale" in all files and now you can add your languages in the "_data/sitetext.yml". The will be accessible as "homepage.com/en" etc. so you can create a dedicated language switcher. I still have to figure out how to do it for the portfolio but I am sure there will be a way as well.
Hope this helps someone in the future :)
Is your feature request related to a problem? Please describe.
It would be nice to have support for languages besides English (US).
Describe the solution you'd like
Multiple language support with the use of a sitetext.yml file with different locales, or other implementation.
Additional context
@mmistakes has done a great job of this on his themes. Example