def _require_language(code, fullname, plurals=2, plural_equation='(n != 1)'):
 from pootle_language.models import Language
 criteria = {'code': code, 'fullname': fullname, 'nplurals': plurals, 'pluralequation': plural_equation}
 (language, created) = Language.objects.get_or_create(**criteria)
 if created:
  language.save()
 return language

def _require_language ( code , fullname , plurals = 2 , plural_equation = '(n != 1)' ) : from pootle_language . models import Language criteria = { 'code' : code , 'fullname' : fullname , 'nplurals' : plurals , 'pluralequation' : plural_equation } ( language , created ) = Language . objects . get_or_create ( ** criteria ) if created : language . save ( ) return language
helper to get/create a new language .