Retrieves the SnowballStemmer for a particular language.

    Args:
        language (str): ISO-639-1 code of the language.
332456
def get_language_stemmer(language):
    
    from lunr.languages import SUPPORTED_LANGUAGES
    from nltk.stem.snowball import SnowballStemmer

    return SnowballStemmer(SUPPORTED_LANGUAGES[language])
62715
def get_description(self, language):
        
        description = self.gettext(language, self._description) if self._description else ''
        return ParsableText(description, "rst", self._translations.get(language, gettext.NullTranslations()))
1331168
def get_default_language(language_code=None):
    

    if not language_code:
        language_code = settings.LANGUAGE_CODE

    languages = dict(settings.LANGUAGES).keys()

    # first try if there is an exact language
    if language_code in languages:
        return language_code

    # otherwise split the language code if possible, so iso3
    language_code = language_code.split("-")[0]

    if language_code not in languages:
        raise ImproperlyConfigured("No match in LANGUAGES for LANGUAGE_CODE %s" % settings.LANGUAGE_CODE)

    return language_code
819889
def get_authors(self, language):
        
        return self.gettext(language, self._author) if self._author else ""
245644
def get_language(self):
        
        if 'lang' in self.request.GET:
            lang = self.request.GET['lang'].lower()
            if lang in settings.LANGUAGE_URL_MAP:
                return settings.LANGUAGE_URL_MAP[lang]

        if self.request.META.get('HTTP_ACCEPT_LANGUAGE'):
            best = self.get_best_language(
                self.request.META['HTTP_ACCEPT_LANGUAGE'])
            if best:
                return best
        return settings.LANGUAGE_CODE
41316
def get_languages(self):
        

        raw_response = requests_util.run_request('get', self.API_BASE_URL + '/languages',
                                                 headers=self.__get_header_with_auth())

        return self.parse_raw_response(raw_response)
844975
def get_translations(self, language=None):
        
        from .models import Translation

        if not self.pk:
            return Translation.objects.none()

        return Translation.objects.get_translations(obj=self, language=language)
1037546
def cell_language(source):
    """"""
    if source:
        line = source[0]
        if line.startswith('%%'):
            magic = line[2:]
            if ' ' in magic:
                lang, magic_args = magic.split(' ', 1)
            else:
                lang = magic
                magic_args = ''

            if lang in _JUPYTER_LANGUAGES:
                source.pop(0)
                return lang, magic_args

    return None, None
214248
def get_available_languages(self, obj):
        
        return obj.available_languages if obj is not None else self.model.objects.none()
399326
def _get_language_description(self, language_code):
        

        language = language_code.lower()
        parameter = 'language-' + language
        if self.configure.has_parameter(parameter):
            return self.configure.get_parameter(parameter)
        elif '-' in language:
            codes = re.split(r'\-', language)
            parameter = 'language-' + codes[0]
            if self.configure.has_parameter(parameter):
                return self.configure.get_parameter(parameter)
        return None
654111
private static String getLanguageSuffix(String language) {

        if (language.equals(Locale.JAPANESE.getLanguage())) {
            return "jp";
        } else {
            return language;
        }
    }
1121734
def language(self, language):
        
        if language is None:
            raise ValueError("Invalid value for `language`, must not be `None`")  # noqa: E501
        allowed_values = ["python", "r", "rmarkdown"]  # noqa: E501
        if language not in allowed_values:
            raise ValueError(
                "Invalid value for `language` ({0}), must be one of {1}"  # noqa: E501
                .format(language, allowed_values)
            )

        self._language = language
839234
def set_language(self, language):
        
        if isinstance(language, str):
            language_obj = languages.getlang(language)
            if language_obj:
                self.language = language_obj.code
            else:
                raise TypeError("Language code {} not found".format(language))
        if isinstance(language, languages.Language):
            self.language = language.code
910449
def get_by_code(self, code):
        
        if any(x in code for x in ('_', '-')):
            cc = CultureCode.objects.get(code=code.replace('_', '-'))
            return cc.language

        elif len(code) == 2:
            return self.get(iso_639_1=code)

        elif len(code) == 3:
            return self.get(Q(iso_639_2T=code) |
                            Q(iso_639_2B=code) |
                            Q(iso_639_3=code))

        raise ValueError(
            'Code must be either 2, or 3 characters: "%s" is %s' % (code, len(code)))
1359969
def get_description(self, lang: str=None) -> Literal:
        
        return self.metadata.get_single(key=DC.description, lang=lang)
249332
def get_language():
    
    from parler import appsettings
    language = dj_get_language()
    if language is None and appsettings.PARLER_DEFAULT_ACTIVATE:
        return appsettings.PARLER_DEFAULT_LANGUAGE_CODE
    else:
        return language
64037
def getlanguage(self, language=None, windowsversion=None):
        
        if not language:
            language = self.language
        if language in (None, "", "*", "neutral"):
            return (LANGUAGE_NEUTRAL_NT5,
                    LANGUAGE_NEUTRAL_NT6)[(windowsversion or 
                                           sys.getwindowsversion()) >= (6, )]
        return language