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

[Feature] Adding plugin name to twig #6

Closed
tiipiik opened this issue Aug 5, 2014 · 3 comments
Closed

[Feature] Adding plugin name to twig #6

tiipiik opened this issue Aug 5, 2014 · 3 comments

Comments

@tiipiik
Copy link
Contributor

tiipiik commented Aug 5, 2014

Hi,

don't know if this is the correct name. I am using the translate plugin for me booking plugin, but I already have a lot of rows, so I figure that if I had some other plugins and some text to translate into the front side, there will be a lot of rows, and it would be very difficult to find witch row affect what.
So it would be really great to have something like:
{{ 'My text to translate'|tiipiik.booking|_ }}

Or maybe just have the ability to translate components with the lang files (lang/enlang.php)

@daftspunk
Copy link
Member

Can this not be achieved by extending Twig?

@tiipiik
Copy link
Contributor Author

tiipiik commented Aug 26, 2014

Well, I don't know if this could be achieved this way.

The idea is to have a selectbox in the Translation/Messages backend to switch from global translations to plugin specific translations, and avoid having a loooong list of fields witch may not be always very accurate (think of a message which could be quitte the same but present in 2 plugins and in the global messages, at the end it could be very uneasy to find witch message goes where)

@daftspunk
Copy link
Member

Oh, I see, yes you should use a code instead. Eg:

{{ 'tipik.booking.text'|_ }}

There will be a feature available soon that will allow this to be pre-translated in the theme.

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