Skip to content

Commit

Permalink
Merge branch 'language' of https://github.com/gavishpoddar/dateparser
Browse files Browse the repository at this point in the history
…into pr/gavishpoddar/932
  • Loading branch information
gavishpoddar authored Aug 12, 2021
2 parents 10bd877 + 1a035ea commit ab15a3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ Language Detection
Default Languages
+++++++++++++++++

``DEFAULT_LANGUAGES``: It is a ``list`` of language codes in ISO 639 which is used as default
languages to be used for translation and parsing. eg. "en":
``DEFAULT_LANGUAGES``: It is a ``list`` of language codes in ISO 639 that will be used as default
languages for parsing when the language detection fails. eg. ["en", "fr"]:

>>> from dateparser import parse
>>> parse('3 de marzo de 2020', settings={'DEFAULT_LANGUAGES': ["es"]})
Expand Down
1 change: 0 additions & 1 deletion tests/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ def test_check_settings_wrong_setting_name(self):
param('PREFER_LOCALE_DATE_ORDER', 'false', '', True),
param('DEFAULT_LANGUAGES', 'en', '', ['en']),
param('LANGUAGE_DETECTION_CONFIDENCE_THRESHOLD', '1', '', 0.5),
param('DEFAULT_LANGUAGES', '1', '', ['en']),
])
def test_check_settings(self, setting, wrong_type, wrong_value, valid_value):
with self.assertRaisesRegex(
Expand Down

0 comments on commit ab15a3b

Please sign in to comment.