trails icon indicating copy to clipboard operation
trails copied to clipboard

i18n for front

Open jaumard opened this issue 8 years ago • 2 comments

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 avatar Dec 31 '15 18:12 jaumard

@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.

tjwebb avatar Dec 31 '15 18:12 tjwebb

That would be great ! I will wait :)

jaumard avatar Dec 31 '15 18:12 jaumard