What language code to use for Toki Pona HTML Documents?


I’m writing a HTML document in French, I write <html lang="fr"> at the start. (See here for more info).

“fr” is a language tag. You can find out more about language tags here. However, Toki Pona doesn’t have an official ISO code (it’s been denied two times). So, if your webpage is in Toki Pona what do you write?

The wiki page Codes for Constructed Languages says

“The BCP 47 subtag x can be used to create a suitable private use tag for any constructed language that has not been assigned an official language tag (e.g., art-x-solresol could be used for Solresol).

So you think ok go for “art-x-tokipona". However! You can also add in script codes to indicate what writing system you’re using:

  • art-x-tokipona (Toki Pona general)
  • art-Latn-x-tokipona (Toki Pona written with Latin alphabet)
  • art-Zzzz-x-tokipona (Toki Pona written with Sitelen Pona, a script that doesn’t have a script code (yet) )

You might worry “Oh no! If I don’t list the page as Englsh, google will hide it from search results!". But it seems not the be the case, based on this post from 2016:

We use the hreflang links […] if you have different language versions [of the same page]. But the language attribute within the HTML markup is something we don’t use at all. We’ve found that this language markup is something that is almost always wrong. So we tend to ignore that.

So, yeah, it’s all a bit meaningless. But if you want to adhere to the HTML specs you I think should specify what language you’re using, and this is how to do it (even if it might result theoretically in incorrect rendering on some systems because browsers don’t know how to render “art-x-tokipona”). In the future, if Toki Pona gets its own language code, things will be different, but as of now (April 2020), this is how it’s done.