Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group resource #23

Closed
rtripault opened this issue Feb 2, 2011 · 5 comments
Closed

Group resource #23

rtripault opened this issue Feb 2, 2011 · 5 comments

Comments

@rtripault
Copy link
Contributor

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
Copy link
Owner

mikrobi commented Feb 3, 2011

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
Copy link
Contributor Author

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

  • English
  • Deutsch
  • 中国
  • Français

@mikrobi
Copy link
Owner

mikrobi commented Feb 6, 2011

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
Copy link
Contributor Author

Thanks you for the tip mikrobi

@mikrobi
Copy link
Owner

mikrobi commented Mar 28, 2011

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

  • keeping all translation in the same resource groups may not always be a desired behavior (see my comment above)
  • offering interfaces (or hooks) to implement custom behavior is unnecessary: You can easily write your own plugins which listen to the same events like the Babel plugin does. So there's no need for these interfaces or hooks.

Cheers,
Jakob

@mikrobi mikrobi closed this as completed Mar 28, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants