How can I set different html lang attribute for different countries?

My WordPress theme header.php html language attitude

All page html language attitude :

But I have some pages for different countries. I want to use different html lang attitude code for each country page with single header.php

For example:

English page language attitude : <html lang="en">

Portuguese page language attitude : <html lang="pt">

Spanish page language attitude : <html lang="es">

Indonesian page language attitude : <html lang="id">

Vietnamese page language attitude : <html lang="vi">

etc…

How can I do it?