aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorCraig Blaszczyk2014-12-24 18:26:17 +0000
committerCraig Blaszczyk2015-01-02 11:07:49 +0000
commit7ad7dd6a4292157ed5bcbaacb60b6ccc93fcf201 (patch)
treed0f128f4d192e74e43a8e5e4d074567258e338ce /docs
parent309b5d264166e07510d6cbc54d681268d07957aa (diff)
downloaddjango-rest-framework-7ad7dd6a4292157ed5bcbaacb60b6ccc93fcf201.tar.bz2
match DRF style guide
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/internationalisation.md19
1 files changed, 14 insertions, 5 deletions
diff --git a/docs/topics/internationalisation.md b/docs/topics/internationalisation.md
index 01f96891..552fdd27 100644
--- a/docs/topics/internationalisation.md
+++ b/docs/topics/internationalisation.md
@@ -1,10 +1,10 @@
# Internationalisation
-REST framework ships with translatable error messages. You can make these appear in your language enabling [Django's standard translation mechanisms](https://docs.djangoproject.com/en/1.7/topics/i18n/translation) and by translating the messages into your language.
+REST framework ships with translatable error messages. You can make these appear in your language enabling [Django's standard translation mechanisms][django-translation] and by translating the messages into your language.
## How to translate REST Framework errors
-This guide assumes you are already familiar with how to translate a Django app. If you're not, start by reading [Django's translation docs](https://docs.djangoproject.com/en/1.7/topics/i18n/translation).
+This guide assumes you are already familiar with how to translate a Django app. If you're not, start by reading [Django's translation docs][django-translation].
#### To translate REST framework error messages:
@@ -16,19 +16,28 @@ This guide assumes you are already familiar with how to translate a Django app.
ln -s /home/user/.virtualenvs/myproject/lib/python2.7/site-packages/rest_framework/ rest_framework
```
- To find out where `rest_framework` is installed, run
+ ---
+
+ **Note:** To find out where `rest_framework` is installed, run
```
python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
```
-3. Run Django's `makemessages` command in the normal way, but add the `--symlink` option. For example, if you want to translate into Brazilian Portuguese you would run
+ ---
+
+
+
+3. Run Django's `makemessages` command in the normal way, but add the `--symlink` option. For example, if you want to translate into Brazilian Portuguese you would run
```
manage.py makemessages --symlink -l pt_BR
```
-4. Translate the `django.po` file which is created as normal. This will be in the folder `myapp/locale/pt_BR/LC_MESSAGES`.
+4. Translate the `django.po` file which is created as normal. This will be in the folder `myapp/locale/pt_BR/LC_MESSAGES`.
5. Run `manage.py compilemessages` as normal
6. Restart your server
+
+
+[django-translation]: https://docs.djangoproject.com/en/1.7/topics/i18n/translation