how to change the lang=" " dynamically for multi-language sites

Permalink
I'm having number of multi-language sites, for that i need different languages which should be place in <html lang=' '>. It should be achieved without plugin. Through php hardcode i need. Can anyone please tell me how I could make this work?