Skip to content

syntax extention: formats #18

Open
@puzrin

Description

@puzrin

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions