Translatable models
Is there any plan to provide a facility to translate string contained in other models?
The workflow could be:
Developer
- Developer adds some options (in the same way the ACL works) to define which fields can be translated on a certain
Model
User
- User creates a model with
defaultLanguagestrings - User creates a
Translationmodel which contains:modelId: id of the translated modelmodelName: name of the translated modellanguage: language of thetranslationtranslation: object containing all the translated properties- The unique key will be on
modelId+modelName+language
Requesting Data
When a request is returning a model and a language is specified in the request:
- Query
Translationwith the givenmodelName,modelIdandlanguage - Merge
translationobject into the returning model
We've already set up this system in our company proprietary framework and it's working quite nicely. I think it could be an interesting addition to your framework and I'd love to hear your thoughts about this.
Take a look at https://github.com/strongloop/strong-globalize
@framp I have a similar requirement that of Translatable models which you posted in your comment. Did the strong-globalize module help you achieve that? Please share some thoughts on how you approached setup the translation system. Thanks in advance.
@vijay22sai: Didn't get a chance to try it, I went for a custom made solution.
@framp Ok, Thanks for the quick response. Please share if you used any other opensource stuff for this.