StoreFronts does not yet support automatic multi-lingual support based on the Accept-Language http header. As of July 2015, the language may be manually set by the merchant configuration. That setting alone determines which language file is chosen.
Example Usage:
<div class="ucColorSubHeader">$i18n.write("checkout.viewcart.yourContactEmailField", "Your contact email")</div>
See Also: How StoreFront handles static text and multi-lingual support
Properties
Field | Type | Comment/Sample |
---|
Methods
Method | Returns | Parameters | Parameter Types | Comment/Sample |
---|---|---|---|---|
write | string |
|
| key is the full dot separated path to the message key as found in the language file. Example: If the key isn't found, this default is used instead if true, the return value is html escaped first |
getIsoCode | string | returns back the current ISO Code for the page. Default is ENG . | ||
escape | string | input | string | Takes a block of text and html escapes it so it can be safely added to a web page without causing harm. Example: #foreach($error in $formSupport.errors) #if($error.alreadyEscaped)$!error.message#{else}$i18n.escape($error.message)#{end}<br> #end |
newlineToBreaks | string | input | string | Takes a block of text and converts all newlines to <br> tags so that the text remains consistent rendered in html. |