portage-CEG / portage-ceg.github.io

https://portage-ceg.github.io/
0 stars 3 forks source link

Top-menu language selector #15

Closed jasonbrodeur closed 3 years ago

jasonbrodeur commented 4 years ago

We need to decide if the language selector button on the top menu should redirect the user to the corresponding page in the other language, or whether it should go to the home page in that language (currently, the latter is what happens). If we are keeping this functionality, we may want to change the label to "English Home".

mediagestalt commented 4 years ago

I have the code for this. See here for an example. It'll take some fiddling, but I can change it over if you like it.

mediagestalt commented 3 years ago

This is now working for pages, but still not posts :)

jasonbrodeur commented 3 years ago

Works great! Thanks for the update :)

mediagestalt commented 3 years ago

Somehow I got this to work. The language selector will only show if there are posts in both languages. If we want to change the selector text from FR / EN to something else, I'll have to come up with a small solution for that. Right now it's pulling those labels from the lang tag. It shouldn't be a big issue.