# Calculate append=patch format=patch link=/bootmenu/lang.config mirror
<reg>([^;\n]+);([^;\n]+);([^;\n]+);([^;\n]+);(.*)</reg>
<text>menuentry "\1" {
      commonlang "$chosen" \3 \4 \5
}
</text>
<reg>HEADER</reg>
<text>
function commonlang {
      echo "Switching to: $1"
      set lang=$2
      set bootlang=$2
      set bootkeymap=$3
      set boottimezone=$4
      export lang
      export bootlang
      export bootkeymap
      export boottimezone
      configfile /boot/grub/grub.cfg
}

submenu "Language Selection" {
</text>
<reg>FOOTER</reg>
<text>}</text>
