diff options
author | tg(x) <*@tg-x.net> | 2016-03-01 15:27:56 +0100 |
---|---|---|
committer | tg(x) <*@tg-x.net> | 2016-03-01 15:27:56 +0100 |
commit | 993ada836fc6992997cc69c1672ceb8d2dcf08c2 (patch) | |
tree | 80300708ddce69a4c7b23d4ddecca7d5201eec85 /dev-wallet-wx.rst | |
parent | 0c09f817c1eeadc2640782b422c00a1e7c4438a3 (diff) | |
download | docs-993ada836fc6992997cc69c1672ceb8d2dcf08c2.tar.gz docs-993ada836fc6992997cc69c1672ceb8d2dcf08c2.tar.bz2 docs-993ada836fc6992997cc69c1672ceb8d2dcf08c2.zip |
wallet-wx-i18n
Diffstat (limited to 'dev-wallet-wx.rst')
-rw-r--r-- | dev-wallet-wx.rst | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/dev-wallet-wx.rst b/dev-wallet-wx.rst index 255a8736..898b754c 100644 --- a/dev-wallet-wx.rst +++ b/dev-wallet-wx.rst @@ -158,12 +158,12 @@ Strings in the JavaScript code are internationalised using the following functio - *i18n*: translate string with arbitrary arguments, the result is returned as string. .. code-block:: js - ``i18n`You have ${n} coins.`` + i18n`You have ${n} coins. - *i18n.parts*: Interpolate i18nized values with arbitrary objects. Useful for example to include HTML elements. .. code-block:: js - ``i18n.parts`Visit ${link} to get more coins.``` + i18n.parts`Visit ${link} to get more coins.` - *i18n.pluralize*: translate with plural form @@ -182,5 +182,11 @@ To extract strings from sources and update the .po files, run: $ make i18n -In static HTML files the ``lang`` attribute is used for language-specific strings. +In static HTML files the ``lang`` attribute is used for language-specific strings: + +.. code-block:: html + + <p lang="en">Hello World!</p> + <p lang="de">Hallo Welt!</p> + ``lib/i18n.js`` and ``style/lang.css`` needs to be included for this to work. |