input: Write a function to create a translation field for storing a string in multiple languages in a Django model. Use the TransCharField or TransTextField subclass of TransField depending on the widget needed. Use the TransDbValue class to store the translations in a dictionary format and implement the get_in_language and set_in_language methods to access the translations. Use the TransFormField class for form validation in admin and when using ModelForm.
  assert create_translation_field("char")=="TransCharField"
  assert create_translation_field("text")=="TransTextField"
  assert create_translation_field("char").get_db_prep_save({"en": "Hello", "es": "Hola"})=='{\'en\': \'Hello\', \'es\': \'Hola\'}'
  assert create_translation_field("text").get_db_prep_save({"en": "Hello World", "es": "Hola Mundo"})=='{\'en\': \'Hello World\', \'es\': \'Hola Mundo\'}'
  assert create_translation_field("char").formfield().__class__.__name__=="TransFormField"
  assert create_translation_field("text").formfield().__class__.__name__=="TransFormField"
output: def create_translation_field(field_type):
      if field_type == "char":
          return TransCharField
      elif field_type == "text":
          return TransTextField
      else:
          raise ValueError("Invalid field type")