summaryrefslogtreecommitdiff
path: root/doc/yelp-xsl/C/l10n.page
blob: 37c4c80d84f1859e5437fcdeee49971863011729 (plain)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:xsl="FIXME" type="guide" style="xslt-stylesheet" id="l10n">
 <info>
  <link type="guide" xref="stylesheets" group="l10n"/>
  <desc>Templates for translated strings, with format strings and plural forms.</desc>
  <revision version="3.18" date="2015-07-24" status="final"/>
 </info>
 <title>Localized Strings</title>
 <p>This stylesheet contains templates for getting localized strings, including
 format strings and plural forms. Format strings are important for proper
 localization, as constructing sentences from concatenation often produces
 poor results in many languages.</p>
 <p>By default, the templates in this stylesheet work on the translations shipped
 with yelp-xsl, but the templates can be reused by yelp-xsl extensions (or even
 entirely separate stylesheets) by installing XML files with the translations
 under the domains subdirectory of the directory holding this file. The format
 of the file is designed to work well with itstool's join mode.</p>
 <links type="topic" groups="imports" style="linklist">
  <title>Imports Stylesheets</title>
 </links>
 <links type="topic" groups="includes" style="linklist">
  <title>Includes Stylesheets</title>
 </links>
 <links type="topic" groups="params" style="linklist">
  <title>Defines Parameters</title>
 </links>
 <links type="topic" groups="keys" style="linklist">
  <title>Defines Keys</title>
 </links>
 <links type="topic" groups="templates" style="linklist">
  <title>Defines Templates</title>
 </links>
 <links type="topic" groups="modes" style="linklist">
  <title>Defines Modes</title>
 </links>
 <list style="compact">
  <title>Calls Parameters</title>
  <item>
   <p><link xref="l10n.locale"/></p>
  </item>
 </list>
 <list style="compact">
  <title>Calls Keys</title>
  <item>
   <p><link xref="l10n.msgstr.key"/></p>
  </item>
 </list>
 <list style="compact">
  <title>Calls Modes</title>
  <item>
   <p><link xref="l10n.format.mode"/></p>
  </item>
 </list>
 <table rules="rows">
  <title>Implements Templates</title>
  <thead>
   <tr>
    <th>
     <p>Mode</p>
    </th>
    <th>
     <p>Match</p>
    </th>
   </tr>
  </thead>
  <tbody>
   <tr>
    <td>
     <p><code xref="l10n.format.mode">l10n.format.mode</code></p>
    </td>
    <td>
     <p><code>*</code></p>
    </td>
   </tr>
   <tr>
    <td>
     <p><code xref="l10n.format.mode">l10n.format.mode</code></p>
    </td>
    <td>
     <p><code>msg:node</code></p>
    </td>
   </tr>
   <tr>
    <td>
     <p><code xref="l10n.format.mode">l10n.format.mode</code></p>
    </td>
    <td>
     <p><code>msg:string</code></p>
    </td>
   </tr>
  </tbody>
 </table>
</page>