mikrobi / babel

Babel is an Extra for MODx Revolution that creates linked documents across different contexts. The easy way for your multilingual site!
https://mikrobi.github.io/babel
GNU General Public License v2.0
59 stars 39 forks source link

Group resource #23

Closed rtripault closed 13 years ago

rtripault commented 13 years ago

While creating a translation, group resources aren't kept.

In my process, if the original resource is inside a group resource, the translations should also be in that group resource. But does everyone need that (no concrete idea where this wouldn't be needed came to my mind)?

mikrobi commented 13 years ago

Hmm, I don't think that this behaviour is desired generally. Maybe you have editors for each language which should have only access to the resources of one specific language. In this case adding translations to the same group resource is not desired.

Nevertheless I could implement some interfaces by which you can add some custom behaviour to the Babel translation process via your own snippets. Something like hooks in the FormIt snippet: http://rtfm.modx.com/display/ADDON/FormIt.Hooks

What do you think about this?

rtripault commented 13 years ago

That would be a good addition to Babel, indeed. Anyway, in my case, group resources are here only for front-end restrictions, nothing dealing with the back-end.

I dont know if i should open another issue, but while displaying names/translations with BabelLinks snippet, langues are displayed in the context's langue. My thought would be to display them in their language, ex. :

mikrobi commented 13 years ago

This is already possible by using your own modified BabelLink chunk. Instead of using this language tag (used in the default chunk): [[%babel.language[[+cultureKey]]? &topic=default &namespace=babel]] You should use something like this: [[%babel.language[[+cultureKey]]? &topic=default &namespace=babel &language=[[+cultureKey]]]]

Check the docs for more details: http://rtfm.modx.com/display/revolution20/Internationalization

rtripault commented 13 years ago

Thanks you for the tip mikrobi

mikrobi commented 13 years ago

After thinking more about this issue I won't apply any changes to the Babel Plugin. Here is why:

Cheers, Jakob