trails
trails copied to clipboard
i18n for front
I never see this kind of feature in any framework but in every project I made with i18n the problem as occurred. I would like to have one translation file per language but some translation are for front, some other for the back and some for both. I don't like to duplicate translation files to have one front and one back cause if you update one you have to update the other as well (and for all languages even if you don't know them)
I know i18n can be use in .jade
and other template engine. But for applications with dynamic front component it happen that you have to translate keys under your javascript front files.
So I find it will be cool if translation file can allow to export i18n script to front with only translations allowed to it.
Maybe translation file can look like this :
{
'front' : {
'key' : 'translation'
},
'both' : {
'key' : 'translation'
},
'back' : {
'key' : 'translation'
}
}
How guys did you do this kind of stuff anyway ? What do you think @tjwebb ? I see you're implementing i18n :)
@jaumard I believe that my design will support this use case naturally. I'm going to try to finish up the i18n integration today, and once I push it then I'll show how I think you can achieve your goal.
That would be great ! I will wait :)