On Mar 5, 2013, at 10:31 PM, Roberto López López <roberto.lo...@uni.no> wrote:

> Hi guys,
> 
> I am developing a django application and between my requirements there
> is being able to set the model fields into different languages.
> 
> For example:
> 
> class Employee(models.Model):
>    position = models.CharField()
>    # etc.
> 
> The employee position won't be the same in English and Spanish. Ideally,
> when an user fills in the data for an employee using the admin, there
> will be one tab for each language defined in the settings file.
> 
> Do you have any suggestion about how to deal with this issue?

Django-modeltranslation: https://github.com/deschler/django-modeltranslation

Very nice and easy, I use it all the time, works like a charm. You can do the 
tabs with some custom CSS and JS in the Admin through a Media class like this:

class Media:
        js = (
            'modeltranslation/js/force_jquery.js',
            
'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.24/jquery-ui.min.js',
            'modeltranslation/js/tabbed_translation_fields.js',
        )
        css = {
            'screen': ('modeltranslation/css/tabbed_translation_fields.css',),
            }

Johan

> 
> Thanks!
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to