Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL structure for internationalized websites #521

Open
xfq opened this issue Aug 26, 2023 · 3 comments
Open

URL structure for internationalized websites #521

xfq opened this issue Aug 26, 2023 · 3 comments

Comments

@xfq
Copy link
Member

xfq commented Aug 26, 2023

It might be useful to write an article about how to design a URL structure for an internationalized website. We can explain the pros and cons of each approach and let the content authors judge for themselves. There's some relevant stuff in Monolingual vs. multilingual Web sites, but it didn't mention URLs.

Some of the common URL structures for internationalized websites include:

Different domains

Example:

  • douyin.com and tiktok.com

ccTLDs (including IDN ccTLDs)

Examples:

  • google.co.jp
  • apple.com.cn
  • amazon.co.jp
  • philips.com.hk

Using this approach requires spending money to buy register new domain names, but you can use different servers for different regions.

Subdomain

Examples:

  • zh.wikipedia.org
  • hk.yahoo.com

Subdirectory

Examples:

Query string

Examples:

Change the file name

Example:

https://www.w3.org/International/questions/qa-site-conneg.sv.html

No change to the URL

Examples:

  • Facebook (main site, the support pages use query strings)
  • LinkedIn (main site, the support pages use query strings)
  • https://web.dev/
@aphillips
Copy link
Contributor

This might be a useful article, although please note that the various URL elements you cite are doing different things. In some cases they convey locale variation. In other cases they refer to region-specific sites or region-specific content. Language negotiation and preference management might be a good subset: I seem to have written that down multiple times of late...

@himorin
Copy link
Contributor

himorin commented Aug 28, 2023

For change the file name one, this was a commonly used multiple file extensions' option, which was a part of mod_mime.c. And there was no defined order among multiple file extensions, so both .<lang>.<ext> and .<ext>.<lang> were handled as the same. (in some special case, when a file extension is tighten to specific data handler, order has some mean, although...)
e.g. switched case at https://www.debian.org/releases/stretch/arm64/apbs04.html.ja

@r12a
Copy link
Contributor

r12a commented Aug 29, 2023

Note that .<lang>.<ext> and .<ext>.<lang> are not interchangeable if you're not reading the resource via a server. That's why our articles always use .<lang>.<ext>. In fact, there are advantages to the latter when serving over a server, too, in that it's (marginally) easier to type ...es than ...html.es.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants