From 9be528a3fbae786ea8b3da7de14a1fac05467af1 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 26 Sep 2019 10:07:18 +1000 Subject: [PATCH] Add (brief) documentation page regarding translations --- InvenTree/InvenTree/settings.py | 2 +- InvenTree/config_template.yaml | 2 +- docs/index.rst | 1 + docs/translate.rst | 14 ++++++++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 docs/translate.rst diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 8e6f86a0e0..2ad7ae1c8b 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -228,7 +228,7 @@ if not type(EXTRA_URL_SCHEMES) in [list]: # Internationalization # https://docs.djangoproject.com/en/1.10/topics/i18n/ -LANGUAGE_CODE = CONFIG.get('language', 'de-ge') +LANGUAGE_CODE = CONFIG.get('language', 'en-us') # If a new language translation is supported, it must be added here LANGUAGES = [ diff --git a/InvenTree/config_template.yaml b/InvenTree/config_template.yaml index 73b4a73650..66c6f6d762 100644 --- a/InvenTree/config_template.yaml +++ b/InvenTree/config_template.yaml @@ -18,7 +18,7 @@ database: #HOST: '' #PORT: '' -# Select default system language (default is 'en_us') +# Select default system language (default is 'en-us') language: en-us # Set debug to False to run in production mode diff --git a/docs/index.rst b/docs/index.rst index b5547c2520..ddee7f2b6a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,6 +12,7 @@ InvenTree Source Documentation Deployment Migrate Data Update InvenTree + Translations Backup and Restore Modal Forms Tables diff --git a/docs/translate.rst b/docs/translate.rst new file mode 100644 index 0000000000..e81ecef7f8 --- /dev/null +++ b/docs/translate.rst @@ -0,0 +1,14 @@ +Translations +============ + +.. toctree:: + :titlesonly: + :maxdepth: 2 + :caption: Language Translation + :hidden: + +InvenTree supports multi-language translation using the `Django Translation Framework `_ + +Translation strings are located in the `InvenTree/locales/` directory, and translation files can be easily added here. + +To set the default language, change the `langauge` setting in the `config.yaml` settings file. \ No newline at end of file