input: Write a function to create a Django model field that stores a string in multiple languages. Implement the TransCharField and TransTextField subclasses of TransField depending on the widget needed. Use the TransDbValue class to store the translations in a dictionary format and provide methods get_in_language and set_in_language to access translations. Implement the TransFormField class for form validation in admin and ModelForm.
  assert isinstance(TransCharField(), TransField)==True
  assert isinstance(TransTextField(), TransField)==True
  assert TransDbValue().get_in_language('en')==u''
  assert TransDbValue().set_in_language('en', 'Hello')==None
  assert TransDbValue().get_in_language('en')==u'Hello'
  assert TransFormField().clean({'en': 'Hello', 'fr': ''}).has_key('en')==True
  assert TransField().get_internal_type()=='TextField'
  assert TransField().to_python({'en': 'Hello'}).raw_data=={'en': u'Hello'}
  assert TransField().get_db_prep_save({'en': 'Hello'})==u"{u'en': '''Hello'''}"
  assert TransField().formfield().__class__.__name__=='TransFormField'
output: class TransField(models.Field):
      def get_internal_type(self):
          return 'TextField'
  
      def to_python(self, value):
          if isinstance(value, TransDbValue):
              return value
          return TransDbValue(value)
  
      def get_db_prep_save(self, value, connection):
          return repr(value.raw_data)
  
      def formfield(self, **kwargs):
          defaults = {'form_class': TransFormField}
          defaults.update(kwargs)
          return super(TransField, self).formfield(**defaults)
  
  class TransCharField(TransField):
      pass
  
  class TransTextField(TransField):
      pass
  
  class TransDbValue(object):
      def __init__(self, raw_data=None):
          self.raw_data = raw_data if raw_data else {}
  
      def get_in_language(self, lang):
          return self.raw_data.get(lang, u'')
  
      def set_in_language(self, lang, value):
          self.raw_data[lang] = value
  
  class TransFormField(forms.Field):
      def clean(self, value):
          return value