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

Expression language agnostic way of accessing resource bundles #4

Open
erdincyilmazel opened this issue Jun 23, 2013 · 0 comments
Open
Assignees
Milestone

Comments

@erdincyilmazel
Copy link
Owner

For l10n and i18n there needs to be a way to access translation strings from properties files.

The bundled expression language provides a function called "text" to access resource bundles. You can say ${text('title')} to get the text labeled title. However this only works with the bundled EL but not with other alternatives like MVEL or Spring EL.

The ExpressionLanguage implementations should be able to provide custom ways to access resource bundles and there should be support in the template engine parser to access to resource bundles without too much typing.

New syntax could be:

<div>@{title}</div>
<div>@{hello, user}</div>

a file like messages.properties would look like:

title=This is the title
hell=Hello {0}
@ghost ghost assigned erdincyilmazel Jun 23, 2013
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

1 participant