Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def makeTranslation(content, language='en'):
    manager = ITranslationManager(content)
    manager.add_translation(language)
    import transaction; transaction.commit()
    return manager.get_translation(language)
        


src/a/r/archetypes.multilingual-1.2/archetypes/multilingual/tests/test_language_independent.py   archetypes.multilingual(Download)
from archetypes.multilingual.testing import ARCHETYPESMULTILINGUAL_INTEGRATION_TESTING
from archetypes.multilingual.tests.utils import makeContent
from archetypes.multilingual.tests.utils import makeTranslation
from plone.app.testing import TEST_USER_ID, TEST_USER_NAME
from plone.app.testing import setRoles
        contact = 'Fred Flintstone'
        english.setContactName(contact)
        german = makeTranslation(english, 'de')
        self.assertEqual(english.getContactName(), contact)
        self.assertEqual(english.getRawContactName(), contact)