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

Support for human-readable booleans #11

Open
fracz opened this issue May 30, 2017 · 0 comments
Open

Support for human-readable booleans #11

fracz opened this issue May 30, 2017 · 0 comments

Comments

@fracz
Copy link

fracz commented May 30, 2017

The only thing that I really miss from this template engine is a support for different placeholders for booleans.

For example:

$engine->render("The engine is turned {status|on|off}.", ['status' => true]); // The engine is turned on
$engine->render("The engine is turned {electricity|on|off}.", ['electricity' => false]); // The light is turned off

Do you have an idea how this could be added?

Of course, I can use ternary operator in the values, but when it comes to real case (i.e. the data comes from 3rd party library) it would be much simpler to place the desired values in the template.

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