This repository has been archived by the owner on Nov 2, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #115 Add "localizednumber" and "localizedcurrency" filters (G…
…arfield-fr, michaelperrin) This PR was merged into the 1.1.x-dev branch. Discussion ---------- Add "localizednumber" and "localizedcurrency" filters Hello, This is a new version of PR #55 proposed by @Garfield-fr: * Rebased on the `master` branch * Made some changes according to comments made by @stof: remove unneeded arguments, checks on provided values * Added documentation As for the name of these filters, I would go for `localized_date`, `localized_number` and `localized_currency` but as `localizeddate` already exists, I preferred to keep the (weird) naming convention to keep backward compatibility. Naming conventions changes could be made in an other PR, for a future version of Twig. I didn't add tests as there is currently no test for any filter (apart from grammar checks). I can squash all commits into one if needed. Commits ------- 76f532d Add documentation for localizednumber and localizedcurrency filters f6c4130 Add checks on "localizednumber" and "localizedcurrency" filters and small tweaks 380f7f0 Rename getNumberFormatter to twig_get_number_formatter 448a309 Added new filters localizednumber and localizedcurrency on Intl extension
- Loading branch information
Showing
2 changed files
with
154 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters