manpagez: man pages & more
info gettext
Home | html | info | man

File: gettext.info,  Node: Ruby,  Next: sh,  Prev: Go,  Up: List of Programming Languages

16.5.14 Ruby
------------

RPMs
     ruby, ruby-gettext

Ubuntu packages
     ruby, ruby-gettext

File extension
     ‘rb’

String syntax
     ‘"abc"’, ‘'abc'’, ‘%q/abc/’ etc., ‘%q(abc)’, ‘%q[abc]’, ‘%q{abc}’

gettext shorthand
     ‘_("abc")’

gettext/ngettext functions
     ‘gettext’, ‘ngettext’

textdomain
     --

bindtextdomain
     ‘bindtextdomain’ function

setlocale
     --

Prerequisite
     ‘require 'gettext'’ ‘include GetText’

Use or emulate GNU gettext
     emulate

Extractor
     ‘xgettext’

Formatting with positions
     ‘sprintf("%2$d %1$d", x, y)’
     ‘"%{new} replaces %{old}" % {:old => oldvalue, :new => newvalue}’

Portability
     fully portable

po-mode marking
     --

   An example is available in the ‘examples’ directory: ‘hello-ruby’.

© manpagez.com 2000-2026
Individual documents may contain additional copyright information.