A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/rtfd/readthedocs.org/issues/2763 below:

Standardize language slug in URLs (e.g. `/pt_BR/` -> `/pt-br/`) · Issue #2763 · readthedocs/readthedocs.org · GitHub

Hi,

I have a question about the lang_slug which currently is, according to models.py:175, just the configured language. So readthedocs is actually using for Portuguese as spoken in Brasil /pt_BR/ in the path, which looks heavy being the only path segment with an underscore and the only path segment with capitalized characters. I'd prefer to see /pt-br/ here.

I can understand it can't be easily changed (sites already generated with /pt_BR/ in URLs, blogs pointing to those docs…), so there's some solutions:

  1. Keep raw IETF language tags like pt_BR in URLs, capitalized and with an underscore.
  2. Change to lower-cased-with-dash language tags and automatically generate 301 redirections.
  3. Allow to configure the lang_slug near the language, keeping lang_slug=language by default.

I think 3 is probably the best solution as it's not breaking anything and allowing to fully personalize the language slug, typically allowing "fr-fr", "fr-FR", "fr_FR", too if one really wants or needs it, typically while porting a manually generated localized documentation to readthedocs.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4