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

I added the i18n support. #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

I added the i18n support. #43

wants to merge 1 commit into from

Conversation

taai
Copy link

@taai taai commented Aug 6, 2012

Normally you can translate the text inside your View_Something class and include that text in your template by using variables. But I find it useful to write the text right in the template and translate it from there. Otherways there are too many variables that actually doesn't get used anywhere else.

An example of how to translate the text in templates:

<div>{{#i18n}}Email{{/i18n}}</div>

@taai
Copy link
Author

taai commented Aug 6, 2012

Probably could use {{#__}}Email{{/__}} syntax, like normaly used __('Email'), but I don't know...

@zombor
Copy link
Owner

zombor commented Aug 6, 2012

I don't think this is a good addition for the core repo. If someone needs translation, it's trivial to add this lambda function to your base view class.

@taai
Copy link
Author

taai commented Aug 7, 2012

It's ok. I just tought it would be useful for others, who were used to default Kohana's templates. :)

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

Successfully merging this pull request may close these issues.

2 participants