Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

MultiLingualField for MongoEngine

Project Description

Simple extension for MongoEngine, which adds MultiLingualField (based on MultiLingualString). Some self-describing examples:

from locale import setlocale, LC_ALL
from mongoengine import Document, connect
from mongoengine_mls import MultiLingualField

class Country(Document):
    meta = {"indexes": ["name.language"]}
    name = MultiLingualField(required=True)

setlocale(LC_ALL, "en_US.UTF-8")

ru = Country(name={"en": "Russia", "ru": u"Россия"})

print(  # => Russia
print( >> "ru")  # => Россия

ru2 = Country.objects.first() = [
    {"language": "en", "value": "Russian Federation"},
    {"language": "ru", "value": u"Российская Федерация"}

print(  # => Russia Federation
print(type(  # => <class 'mls.MultiLingualString'>

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(5.0 kB) Copy SHA256 Hash SHA256
Wheel 2.7 Apr 17, 2015
(3.2 kB) Copy SHA256 Hash SHA256
Source None Apr 17, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers