Feature #42169
Use named indexes for placeholders in translation labels
Status:
Resolved
Priority:
Should have
Assignee:
Category:
I18n
Target version:
Start date:
2012-10-19
Due date:
% Done:
100%
Estimated time:
PHP Version:
Has patch:
Yes
Complexity:
easy
Description
Right now you can replace placedholders in translations like this:
<f:translate key="myKey" arguments="{0:'foo', 1:'bar'}" />
The key would look like this:
This is my awesome {0}Key that displays some {1}Value
The result would be:
This is my awesome fooKey that displays some barValue.
So far so good. Now it would be better to actually give that placeholders a name because that makes it much easier to understand the translations.
Something like:
Template: <f:translate key="myKey" arguments="{keyName:'foo', valueName:'bar'}" /> Translation: This is my awesome {keyName}Key that displays some {valueName}Value
Updated by Thomas Hempel over 8 years ago
There is a review request available at
Updated by Gerrit Code Review over 8 years ago
- Status changed from New to Under Review
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/15809
Updated by Gerrit Code Review over 8 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/15809
Updated by Thomas Hempel about 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 71318ee5819bc78a04d2c632774ac0abb13b946f.