As all know in magento .phtml we can translate text by using
__('text to translate'); ?>
but it is not possible to do in cms pages and blocks
if we can use following directive in cms page or static block
{{translate text="text to translate"}}
then it will be very useful and store owner can work with very less block and pages instead of duplicating same block or page for multiple stores where text change required.
if we add this functionality to magento core then it can be very useful.
Ref : http://www.lotusseedsdesign.com/blog/extend-the-use-of-links-phtml
Hello. For this you should rather create separate blocks and assign them to proper store views. What is the advantage of your approach?
When we have more stores its hectic to make same change in all blocks just for text when html is same
at that time this approach can be useful. for html changes old approch is always there.
Hello. This is not currently planned. We encourage you to contribute code to improve it. Maybe with custom variables functionality?
@mage2-team i made some code to add this as a feature. should i open a new issue or can you reopen this one so i can submit a pull request? keep rocking, v2 looks amazing.
For the record, there is natively the trans
CMS directive, at least since version 2.0.0, eg :
{{trans "Email:"}}
or
{{trans
'Forgot your account password? Click <a href="%reset_url">here</a> to reset it.'
reset_url="$this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])"
|raw}}
Is the {{trans directive documented somewhere on this matter?
Most helpful comment
For the record, there is natively the
trans
CMS directive, at least since version 2.0.0, eg :or