Our API docs in Portuguese or English: where each language lives and how to switch

WhatsApp & APIs·· 34 views· 2 min read

The short answer: the whole documentation exists in English and Portuguese, page by page. The language selector at the top takes you to the same page in the other language, without going back to the start.

Where each language lives

One language sits at the root of the address and the other in its own folder: /en for English or /pt for Portuguese. The root holds the main language of the MozOut documentation. If you open the folder of the language that is at the root, the documentation takes you to the same place, so links with /en or /pt always work.

Shortcuts: the documentation in English and the documentation in Portuguese.

On some brands, the selector also lists the countries of the website; each country leads to the matching language of the documentation.

What changes with the language, and what does not

What With the language
Texts, headings and menus Translated.
Code examples The same, with the Accept-Language header in the language of the page.
Field names, paths, permissions and error codes In English in both languages.
API error messages Depend on the Accept-Language header of the request, not on the language of the page. Without the header, they come in English.
Search Each language has its own index.
Markdown versions One per page and per language.
llms.txt A single file, with both lists.

The message language in your program

To get error messages in Portuguese, your program sends:

Accept-Language: pt

The error code field never changes with the language. That is what your program should decide on; the message is for showing to people.

Working with a Portuguese-speaking team? Send them the links to the Portuguese version, which has the same content. See how to hand the documentation to a developer.

Prefer Portuguese? The same documentation, page by page.

See the Portuguese version

SEE ALSO

Our API documentation: what it is, who it is for and how to find it

Handing our API docs to a developer or agency: section links, Markdown and the specification

Searching our API documentation: Ctrl+K, the slash key, results by section and recent searches

Every page of our API docs in Markdown: View as Markdown, Copy page and what they are for

How our API documentation is organised: Get started, Areas, API reference and Playground

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from ₦9.900,00/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.