0

I'm currently using a per-module translation approach. I.e, I have translation files for each module separately. But it's come to my attention that if we use translate('x') in module 'foo' and 'x' is translated to 'y' in module 'bar', translate('x') returns 'y' in module foo. So my question is, is there a problem if I create one single catalog for all modules? Cause right now updating the language files is kinda annoying.

Thanks

Milad.Nozari
  • 2,243
  • 3
  • 26
  • 47

1 Answers1

1

The point of using per module translations is to have separate translation domains, so that modules are independent and key collisions are eliminated.

What you are basically doing is translate('x', 'default'), that always returns 'y' if you define the translation of 'x' to 'y' in the domain 'default'.

If you write your modules as independent, you should use different translation domains. If you don't plan on using the modules separately, you can use just one translation domain and one translation file, e. g. in the Application module or by using the database for translation storage/update.

mihaidoru
  • 327
  • 2
  • 10
  • Thanks for the answer bro. Well the fact is that my modules(unfortunately) are too tightly coupled and in order to work independently they would require substantial amount of amendments and revisions. So in this case I guess I'm gonna stick to one translation module IF I can find a way to merge the current translations, since translating the whole site again would require a lot of time that I don't have. – Milad.Nozari Oct 09 '13 at 11:03