-1

I'm working on a website that has different languages, being English the master language. Most of the site is fully translated but English content has a bigger team so it usually goes a bit ahead of other languages.

Long story short. The requirement for dealing with this situation is to serve the English content in the meanwhile. However, I am not sure what is the proper status code for this case.

The page wouldn't appear completely in English, there are some parts of the page that appear in the chosen language so It can be seen as a placeholder until the "translated content" is there

What HTTP status code should I use?

Note: I have gone through https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages and 203, 204, 206, 302 and 404 but none of them really fit

Update: 200 OK, doesn't feel completely right since the final page doesn't exist just yet and the page is tagged as noindex so crawlers can't index it. This has been defined as a mechanism for avoiding delivering a 404.

1
  • 4
    What would be wrong with 200 OK?
    – amon
    Commented Aug 24, 2021 at 13:05

3 Answers 3

6

The HTTP Status code is used to tell the client software what the result of the request is, so that the software can take appropriate action.

If the appropriate action for the software is to ignore that the resource representation (or the HTML page) uses a mix of natural languages, you can just use the 200 OK status code.

Which natural language the user wants to see is at best a hint, so it is unlikely that the client software will even try to interpret what natural language is used for the text being shown to the user.

1
  • 200 OK, doesn't feel completely right since the final page doesn't exist just yet and the page is marked as no_index so crawlers can't index it. This has been defined as a mechanism for avoiding delivering a 404. On the other hand, you are right and the client software doesn't have to do anything.
    – JCalcines
    Commented Aug 25, 2021 at 7:57
-1

Status 200, and the request returns both language and text in a format of your choice.

-1

Status codes are for determining the status of action performed at the backend. I believe 200 is OK if you are delivering the content. Otherwise do not deliver the content and send error status code.

Not the answer you're looking for? Browse other questions tagged or ask your own question.