summaryrefslogtreecommitdiff
path: root/docs/translations.markdown
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-02-21 14:47:03 -0500
committerFrederic Guillot <fred@kanboard.net>2015-02-21 14:47:03 -0500
commit8b73025f185f326ae6c06ce21aefea2a87d8a575 (patch)
treef40c64f353e9441d8e35d657c453cc0066d1f0bc /docs/translations.markdown
parent39dab436ea529c95c584ee7d13df103f66c6027f (diff)
Improve translation documentation
Diffstat (limited to 'docs/translations.markdown')
-rw-r--r--docs/translations.markdown23
1 files changed, 20 insertions, 3 deletions
diff --git a/docs/translations.markdown b/docs/translations.markdown
index c01fa2fa..0e01fa9b 100644
--- a/docs/translations.markdown
+++ b/docs/translations.markdown
@@ -32,12 +32,29 @@ How to add new translated text in the application?
Translations are displayed with the following functions in the source code:
-- `t()`: escaped HTML text
-- `e()`: displayed with no escaping
-- `dt()`: date using `strftime()` formats
+- `t()`: dispaly text with HTML escaping
+- `e()`: display text without HTML escaping
+- `dt()`: display date and time using the `strftime()` function formats
Always use the english version in the source code.
+### Date and time translation
+
+Date strings use the function `strftime()` to format the date.
+
+By example, the original English version can be defined like that `Created on %B %e, %Y at %k:%M %p` and that will output something like that `Created on January 11, 2015 at 15:19 PM`. The French version can be modified to display a different format, `Créé le %d/%m/%Y à %H:%M` and the result will be `Créé le 11/01/2015 à 15:19`.
+
+All formats are available in the [PHP documentation](http://php.net/strftime).
+
+### Placeholders
+
+Text strings use the function `sprintf()` to replace elements:
+
+- `%s` is used to replace a string
+- `%d` is used to replace an integer
+
+All formats are available in the [PHP documentation](http://php.net/sprintf).
+
How to find missing translations in the applications?
-----------------------------------------------------