todogroup / todogroup.org

Official TODO Website that containts TODO Guides, OSPO use cases and more resources to advance in the OSPO journey
http://todogroup.org
Other
238 stars 124 forks source link

Improve i18n home page links when in non-English mode #453

Closed node closed 4 months ago

node commented 5 months ago

Our website use unique home page when enable i18n now, the URI is layouts/index.html.

But the links in home page point to the English version totally . This is not good accessibility.

How to fix ?

For examople <a href="/about/about-us" class="button">{{ i18n "explainerButton" }}</a>

One way is adding i18n params to update the value of href attibute like this:

<a href="{{ i18n "xxxx" }}/about/about-us" class="button">{{ i18n "explainerButton" }}

"xxxx" means we will need to use language code here,but I do not know how to get , or add a new params to i18n config file, need help 😄

Another way is we can use different home page in different language mode.

anajsana commented 5 months ago

thanks for raising this issue @node ! @cjyabraham could you take a look at this? 🙂

anajsana commented 5 months ago

Related PR https://github.com/todogroup/todogroup.org/pull/456

cjyabraham commented 5 months ago

I believe this should solve it.

node commented 5 months ago

I believe this should solve it.

Oh yes, great. 😎