Discussions

Ask a Question
Back to All

Multi language sites

I'm looking at using a static site generator for an internal project, but it will need to be translated into a few languages. Do you have a plan for how to support multi language sites as part of Spike?

Hey Rich,

At the moment we are not actively working on an i18n plugin. This is an important issue though, no doubt. I opened an issue on the topic which you can subscribe to for updates if you want!

https://github.com/static-dev/spike/issues/41

That being said, if I needed to build in multiple languages immediately, I would probably compile out my views as client-side templates and have javascript render them with data containing the copy for the appropriate language.

Hey there, very late followup, but we finally have good support for multi language files through the multi option in reshape's loader, docs here. This should allow for any file to produce as many versions as languages you need. Will have more specific documentation on this soon and link here, but I'm going to close this since it works!

Hi Jeff, I'm trying to understand how to use spike-records and multi option in order to generate english and french pages. Basically, all my content that comes from the database have 2 properties, fr and en for the same content. The way I think about it is that at the same time, we should have a french, version of each page and an english page in a "en" folder" of the same page. Now I've look at the multi option of Reshape loader but how do I integrate this into htmlStandards? With my existing locals?

You can pass the multi option right in to reshape-standard, options documented here!

https://github.com/reshape/standard#options

ο»Ώ