File: lang-ruby.texi

package info (click to toggle)
gettext 0.23.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 168,104 kB
  • sloc: ansic: 532,579; sh: 68,252; perl: 28,011; makefile: 9,068; lisp: 3,184; yacc: 1,055; java: 615; cs: 589; cpp: 397; objc: 343; sed: 79; tcl: 63; xml: 40; pascal: 11; awk: 7; php: 7
file content (59 lines) | stat: -rw-r--r-- 1,083 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@c This file is part of the GNU gettext manual.
@c Copyright (C) 1995-2020 Free Software Foundation, Inc.
@c See the file gettext.texi for copying conditions.

@node Ruby
@subsection Ruby
@cindex Ruby

@table @asis
@item RPMs
ruby, ruby-gettext

@item Ubuntu packages
ruby, ruby-gettext

@item File extension
@code{rb}

@item String syntax
@code{"abc"}, @code{'abc'}, @code{%q/abc/} etc.,
@code{%q(abc)}, @code{%q[abc]}, @code{%q@{abc@}}

@item gettext shorthand
@code{_("abc")}

@item gettext/ngettext functions
@code{gettext}, @code{ngettext}

@item textdomain
---

@item bindtextdomain
@code{bindtextdomain} function

@item setlocale
---

@item Prerequisite
@code{require 'gettext'}
@code{include GetText}

@item Use or emulate GNU gettext
emulate

@item Extractor
@code{xgettext}

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

@item Portability
fully portable

@item po-mode marking
---
@end table

@c An example is available in the @file{examples} directory: @code{hello-ruby}.