minetest / contentdb

A content database for Minetest mods, games, and more
https://content.minetest.net
GNU Affero General Public License v3.0
93 stars 45 forks source link

Use URL-based internationalisation selection #349

Closed rubenwardy closed 2 years ago

rubenwardy commented 2 years ago

Instead of storing languages in cookies, ContentDB should probably use URL prefixes instead.

For example:

https://content.minetest.net/fr/
https://content.minetest.net/fr/packages/rubenwardy/conquer/
https://content.minetest.net/fr/user/login/

See https://flask.palletsprojects.com/en/2.0.x/patterns/urlprocessors/

Calinou commented 2 years ago

I'm not a fan of URL-based internationalization, as it breaks when you share URLs to other people. I don't want to see a page in a language I don't understand simply because I clicked on someone else's link. I know the "semantic web" people generally prefer to have URL-based internationalization, but the usability is clearly not there.

For comparison, Lichess used to use URL-based internationalization but switched to cookies for the same reason.

rubenwardy commented 2 years ago

Yeah I was wondering how to combat this. I currently use cookies

The problem with cookies is that Google won't be able to find the translated versions, so whilst ContentDB will correctly show the right languages to users international Google will consider CDB English only