help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Working gettext example for grub.cfg?


From: Jordan Uggla
Subject: Re: Working gettext example for grub.cfg?
Date: Wed, 27 Feb 2013 12:03:33 -0800

On Wed, Feb 27, 2013 at 1:42 AM, Ronny Standtke <address@hidden> wrote:
> Could you please provide a simple working example of the gettext feature in
> a grub.cfg script?

Following bash's syntax for gettext:

menuentry $"This menu entry will be translated!" {

  example_variable=5
  echo $"The value of \$example_variable is: $example_variable !"

  my_favorite_color_translated=$"blue"

  echo $"$my_favorite_color_translated is my favorite color!"
}

For a complete example, including setup of po, pot, and mo files, a
menu entry allowing selection of another language, and setting up
gfxterm with unifont to support displaying (almost) all unicode
strings/characters, see Super GRUB2 Disk (the "baells" branch of the
git repository):
http://git.berlios.de/cgi-bin/cgit.cgi/supergrub/log/?h=baells

-- 
Jordan Uggla (Jordan_U on irc.freenode.net)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]