This template returns a language name from a language code. Alternatively, if a language name is given, it returns the same name.

This template uses only one unnamed parameter, the language code or name.

  • {{langname|en}} returns អង់គ្លេស
  • {{langname|eng}} returns Lua error in Module:languages at line 451: The language code "eng" is not valid..
  • {{langname|English}} returns Lua error in Module:languages at line 451: The language code "English" is not valid..
  • {{langname|Ido}} returns Lua error in Module:languages at line 451: The language code "Ido" is not valid..
  • {{langname|pt}} returns ព័រទុយហ្កាល់
  • {{langname|Portuguese}} returns Lua error in Module:languages at line 451: The language code "Portuguese" is not valid..
  • {{langname|fiu-vro}} returns Lua error in Module:languages at line 451: The language code "fiu-vro" is not valid..

Invalid or unknown language:

  • {{langname|xyzzy}} produces Lua error in Module:languages at line 451: The language code "xyzzy" is not valid..
  • {{langname|Some Other}} produces Lua error in Module:languages at line 451: The language code "Some Other" is not valid..