Search code examples
isoidentification

There is a "code" for language (English, Spanish, etc...) not defined?


In my application there is language detection. Languages have some identification code like en for English, pt for Portuguese, fr for French, etc.

Is there a language code for the case when a language cannot be identified (unknown language)?


Solution

  • The language codes you're using look like ISO 639-1. There is no ISO 639-1 code for an indeterminate or unknown language; however, "xx" could be used as as a reasonable placeholder.