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

syntax extention: formats #18

Open
puzrin opened this issue May 20, 2014 · 1 comment
Open

syntax extention: formats #18

puzrin opened this issue May 20, 2014 · 1 comment
Labels

Comments

@puzrin
Copy link
Member

puzrin commented May 20, 2014

If one need piped processing for variables to do additional l10n, it's possible to use this notation:

#{variable:processor|param1|param2|...}

Examples:

  • #{count:localize_number}
  • #{date:format|short}
  • #{another.translation:phrase} - insert another translation by this key

The same can be done for selector notation, to change selection rule:

  • ((male|female))[:gender]
  • ((male|female))[:ordinal]

That's not planned right now, because no real requests exist. Also syntax is subject to discuss.

Probably, that should not be done at all, because data can be prepared before passing to translate()

@puzrin puzrin changed the title [memo] syntax extention: formats syntax extention: formats May 20, 2014
@puzrin puzrin added the idea label May 20, 2014
@puzrin
Copy link
Member Author

puzrin commented Mar 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant