summaryrefslogtreecommitdiff
path: root/tests/i18n/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/i18n/tests.py')
-rw-r--r--tests/i18n/tests.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py
index 29bb2e9cb6..8b9f83bf4a 100644
--- a/tests/i18n/tests.py
+++ b/tests/i18n/tests.py
@@ -1527,3 +1527,22 @@ class TranslationFilesMissing(TestCase):
self.patchGettextFind()
trans_real._translations = {}
self.assertRaises(IOError, activate, 'en')
+
+
+class NonDjangoLanguageTests(SimpleTestCase):
+ """
+ A language non present in default Django languages can still be
+ installed/used by a Django project.
+ """
+ @override_settings(
+ USE_I18N=True,
+ LANGUAGES=[
+ ('en-us', 'English'),
+ ('xxx', 'Somelanguage'),
+ ],
+ LANGUAGE_CODE='xxx',
+ LOCALE_PATHS=[os.path.join(here, 'commands', 'locale')],
+ )
+ def test_non_django_language(self):
+ self.assertEqual(get_language(), 'xxx')
+ self.assertEqual(ugettext("year"), "reay")