Language Models

exception jangle.models.languages.InvalidISO639Error[source]
class jangle.models.languages.ISOLanguageCodesManager(*args, **kwargs)[source]
get_from_ietf(code: str) ISOLanguageCodes[source]
register(clear=True, batch_size=64) None[source]

Saves ISO 639-2 and 639-1 codes from the Library of Congress. See https://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt.

class jangle.models.languages.ISOLanguageCodes(*args, **kwargs)[source]

ISO 639-2 and 639-1 language codeset, saved from the Library of Congress.

language: Optional[ISOLanguage]
part_2b

Bibliographic code (ISO 639-2/B).

part_2t

Terminological code (ISO 639-2/T).

part_1

Alpha-2 code (ISO 639-1).

names_en

English names. Separated with “;” if multiple exist.

names_fr

French names. Separated with “;” if multiple exist.

property ietf: str

Code used in IETF language tags.

objects = <jangle.models.languages.ISOLanguageCodesManager object>
class jangle.models.languages.SimpleISOLanguageCollectionManager(*args, **kwargs)[source]
get_from_ietf(code: str) SimpleISOLanguageCollection[source]
register(clear=True, batch_size=64) None[source]

Saves basic ISO 639-5 data from the Library of Congress. See http://id.loc.gov/vocabulary/iso639-5.tsv.

class jangle.models.languages.SimpleISOLanguageCollection(*args, **kwargs)[source]

Basic data for an ISO 639-5 language collection.

part_5

ISO 639-5 alpha-3 code.

names_en

English names. Separated with “;” if multiple exist.

names_fr

French names. Separated with “;” if multiple exist.

property loc_uri: str

URI on the Library of Congress. Contains MADS/SKOS RDF data.

property ietf: str

Code used in IETF language tags.

objects = <jangle.models.languages.SimpleISOLanguageCollectionManager object>
class jangle.models.languages.ISOLanguageQuerySet(model=None, query=None, using=None, hints=None)[source]
macrolanguages() ISOLanguageQuerySet[source]
individuals() ISOLanguageQuerySet[source]
specials() ISOLanguageQuerySet[source]
get_from_ietf(code: str) ISOLanguage[source]
class jangle.models.languages.ISOLanguageManager(*args, **kwargs)[source]
get_queryset() ISOLanguageQuerySet[source]

Return a new QuerySet object. Subclasses can override this method to customize the behavior of the Manager.

individuals() ISOLanguageQuerySet[source]
macrolanguages() ISOLanguageQuerySet[source]
specials() ISOLanguageQuerySet[source]
get_from_ietf(code: str) ISOLanguage[source]
register(clear=True, batch_size=64, zf: Optional[ZipFile] = None) None[source]

Saves ISO 639-3 languages from SIL International.

class jangle.models.languages.ISOLanguage(*args, **kwargs)[source]

Represents an ISO 639-3 language, saved from SIL international

class LanguageType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
ANCIENT = 'A'
CONSTRUCTED = 'C'
EXTINCT = 'E'
HISTORICAL = 'H'
LIVING = 'L'
SPECIAL = 'S'
class Scope(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
INDIVIDUAL = 'I'
MACROLANGUAGE = 'M'
SPECIAL = 'S'
names: models.manager.RelatedManager[ISOLanguageName]
codes

ISO 693-1 and 639-2 codes.

ref_name

Reference name.

part_3

Alpha-3 code (ISO 639-3).

lang_type

Type.

scope
comment
codes_id
ext_subtag

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

get_lang_type_display(*, field=<django.db.models.fields.CharField: lang_type>)
get_scope_display(*, field=<django.db.models.fields.CharField: scope>)
individuals

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

macrolanguage_id
regionname_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

macrolanguage

Macrolanguage.

property ietf: str

Shortest ISO 639 code (part 1 or 3).

objects = <jangle.models.languages.ISOLanguageManager object>
class jangle.models.languages.ISOLanguageNameManager(*args, **kwargs)[source]
register(clear=True, batch_size=64, zf: Optional[ZipFile] = None) None[source]

Saves ISO 639-3 language names from SIL International.

class jangle.models.languages.ISOLanguageName(*args, **kwargs)[source]

Represents an English name for an ISO 639-3 language, saved from SIL International.

iso_lang_id
iso_lang

ISO Language.

printable

Printable translated name.

inverted

Inverted translated name.

objects = <jangle.models.languages.ISOLanguageNameManager object>