Skip to content

Commit decd89d

Browse files
authored
Post: Language codes are now normalized (#244)
* Post: Language codes are now normalized Ref readthedocs/readthedocs.org#10750 * Mention redirects
1 parent 26973bf commit decd89d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

language-codes-are-now-normalized.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.. post:: October 24, 2023
2+
:tags: docs, languages, translations
3+
:category: Changelog
4+
:author: Santos
5+
:location: CUE
6+
7+
Language codes are now normalized
8+
=================================
9+
10+
The following language codes are now normalized to be lowercase and use a dash as a separator instead of an underscore:
11+
12+
- ``nb_NO`` is now ``nb-no``
13+
- ``pt_BR`` is now ``pt-br``
14+
- ``es_MX`` is now ``es-mx``
15+
- ``uk_UA`` is now ``uk-ua``
16+
- ``zh_CN`` is now ``zh-cn``
17+
- ``zh_TW`` is now ``zh-tw``
18+
19+
This change affects the following areas:
20+
21+
API:
22+
- When creating or updating projects, you must now use the new normalized language codes.
23+
- The API responses will include the new normalized language codes.
24+
25+
Docs and download URLs:
26+
Previous URLs from projects using the old language codes will redirect to the new normalized language codes.
27+
For example:
28+
29+
- ``https://docs.readthedocs/pt_BR/latest/`` will redirect to ``https://docs.readthedocs/pt-br/latest/``.
30+
- ``https://docs.readthedocs/_/downloads/pt_BR/latest/pdf/`` will redirect to ``https://docs.readthedocs/_/downloads/pt-br/latest/pdf/``.
31+
32+
Redirects:
33+
If you had redirects using the old language codes in the ``From URL`` field,
34+
they were automatically updated to use the new normalized language codes.
35+
36+
This change was implemented to ensure more `readable and clean URLs <https://en.wikipedia.org/wiki/Clean_URL>`__.

0 commit comments

Comments
 (0)