GenderDysphoria / GenderDysphoria.fyi

Site code
Other
224 stars 63 forks source link

Added way for translation links to be page-specific #98

Open gjvnq opened 2 years ago

gjvnq commented 2 years ago

Added file translation-links.json which specifies equivalent pages across translations.

So a page like /en/what-is-gender can send the user to /es/que-es-genero when the user clicks on the Spanish language link.

ErdaradunGaztea commented 2 years ago

Hmm, the only problem I can think of is that all translation-related data is supposed to be stored inside separate folders for each language. I'm more of a R/Python girl, so how feasible would it be to implement in JS something like that?

gjvnq commented 2 years ago

If you don't mind making the english version the "main authority", we could have each page have an en-equiv metadata entry use some JavaScript to stich the whole thing together.

The problem is that it doesn't allow for two different languages to have "sister pages" that don't exist in English.

This whole thing could be made within a couple of hours.