Replace the DOCUMENTS_LANGUAGE_CHOICES setting option. Replaced with the new DOCUMENTS_LANGUAGE_CODES.
Reduce default language code choice from 7800 to the top 100 spoken languages and related (https://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers). Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
16
mayan/apps/documents/runtime.py
Normal file
16
mayan/apps/documents/runtime.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
#import os
|
||||
|
||||
import pycountry
|
||||
|
||||
#from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from .settings import setting_language_codes
|
||||
|
||||
language_choices = [
|
||||
(
|
||||
iso639_3, _(pycountry.languages.get(alpha_3=iso639_3).name)
|
||||
) for iso639_3 in setting_language_codes.value
|
||||
]
|
||||
Reference in New Issue
Block a user