bricobio / bricobio-website

Development for bricobio.com / bricobio.github.io
MIT License
2 stars 2 forks source link

En to Fr translations #8

Closed thomasingalls closed 9 years ago

thomasingalls commented 10 years ago

I want to use a preferred language detection script that stores "en" or "fr" in a cookie upon arrival on the site.

There are two ways this could go afterwards:

  1. the cookie could then be read to load the bricobio.com/en or bricobio.com/fr parts of the site.
  2. A more sophisticated way would be to not have the /en and /fr subdirectories, but instead have harp just serve the right entities from harp.json. Not sure if this is possible, but it would certainly be preferred. That way, the EN/FR button in the upper right could toggle the cookie value and the section of harp.json being read, rather than sending visitors to a new directory with new pages.
zafarali commented 10 years ago

The cookie thing should be possible, I'll take a look at the harpJS documentation if it can store sessions or cookies or something that could make this possible

thomasingalls commented 10 years ago

you might have more luck searching the github repository’s issues, discussions.

https://github.com/sintaxi/harp

On Jun 18, 2014, at 11:50 AM, Zafarali Ahmed notifications@github.com wrote:

The cookie thing should be possible, I'll take a look at the harpJS documentation if it can store sessions or cookies or something that could make this possible

— Reply to this email directly or view it on GitHub.

zafarali commented 10 years ago

Thanks for the heads up!

zafarali commented 10 years ago

Do you want to use this: https://translate.google.com/manager/website/

thomasingalls commented 10 years ago

French is not a second-class language on this site, so no. We'll do manual translations with help from one of the millions of native speakers in Montreal. For the blog entries, we might have some lag, but we'll deal with that as it comes.

As for the nuts and bolts, I've done a en / fr static website in harp before, but I always need to build it twice and manually copy the generated html files into a ~.com/en/ directory. We can replicate that here for the near term.

zafarali commented 10 years ago

Okay greAt! Sorry about that was just a suggestion.

On Monday, June 23, 2014, Thomas Ingalls notifications@github.com wrote:

French is not a second-class language on this site, so no. We'll do manual translations with help from one of the millions of native speakers in Montreal. For the blog entries, we might have some lag, but we'll deal with that as it comes.

As for the nuts and bolts, I've done a en / fr static website in harp before, but I always need to build it twice and manually copy the generated html files into a ~.com/en/ directory. We can replicate that here for the near term.

— Reply to this email directly or view it on GitHub https://github.com/bricobio/bricobio-website/issues/8#issuecomment-46908220 .

zafarali commented 10 years ago

Just to let you know the French translation of the website does not work!

thomasingalls commented 10 years ago

roadmap for translations for now:

  1. public/en/ and public/fr/ directories will both exist, one will be a copy-paste of the other, and each will contain the entire site. only an index.html file will remain in the public root.
  2. a line in the beginning of french or english files will trigger the french or english text, stored in a new folder: _data/en/_text.json or _data/fr/_text.json when the
  3. client-side language preference detection will be put on hold, and the English version will be served in preference for the coming several months.

roadmap for translations for the future: