rfkrocktk/django-locality — Issue #1: Translations for country names.
Author: chronossc
Created: 2012-02-19 03:54:38+00:00
State: open

Hello :], this is a idea and not a real issue.

What about allow country name translations?
We can have a table like:

```python

class Country(models.Model):
...
def get_translation(self,language):
try:
return self.translations.get(country=self.iso3,language=language).name
except (ObjectDoesNotExist,AttributeError):
return self.name
class CountryTranslations(models.Model):
country = models.ForeignKey(Country,to_field='iso3',related_name='translations')
language = models.CharField(max_length=15)
name = models.CharField(max_length=32)
```

We have a list of possible language codes in locale module (or we can search on other places).

Also, we can put it in gettext files in some way, so we can keep it versioned and without need of fixtures.

What u think about?