Tag content with international language codes
Updated 9 August 2022
Use the standard to add consistent, internationally recognised language codes to your data.
1. Summary of the standard鈥檚 use for government
The ISO 639-1 standard uses 2 letter codes to represent the names of more than 500 internationally recognised languages. It does not represent languages that are exclusively for machines. Use this standard to make sure you reference languages in a consistent way across your datasets.
The government chooses standards using the open standards approval process and the Open Standards Board has final approval. Read more about .
2. How this standard meets user needs
Use this standard for consistent language tagging. For example, when using to make sure different systems correctly identify languages.
When systems can consistently identify which languages you鈥檝e used it can help users who:
- want to trade with UK businesses
- plan to travel to the UK from abroad
- live in the UK but do not speak English
The government also has a legal requirement to translate information into Welsh. This standard provides a consistent way of tagging this information so it鈥檚 easier to find.
Using this standard means:
- users can find information in the language they need
- services and content have consistent language tags
- screen readers can identify which language the content is in
3. How to use the standard
When you鈥檙e publishing content in multiple languages you must use this standard鈥檚 2 letter codes in the tags or metadata.
You must use language tags in the relevant HTML and XML document metadata.
This standards does not cover:
- standard methods for attaching language tags to other formats, such as JSON
- methods of presenting a user with text, in particular, HTTP language negotiation or the URL suffix scheme currently used by 188体育
Use the World Wide Web Consortium (W3C) guidance to:
- show you how to annotate , for both HTML and XML formats
- declare the language of a web page or a portion of a web page using
- declare the language of a body of text using the 鈥樷€� attribute
You can also get a list of:
-
on the (IANA) website
- extended language tags with script subtags in , if you need to add information to the language tag
- on the US library of congress website