Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

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

writestring

key

defaultMessage

escape

string

string

boolean (optional)

key is the full dot separated path to the message key as found in the language file. Example: checkout.accessaccount.emailField

If the key isn't found, this default is used instead

if true, the return value is html escaped first

getIsoCodestring  returns back the current ISO Code for the page. Default is ENG.
escapestringinputstring

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
newlineToBreaksstringinputstringTakes a block of text and converts all newlines to <br> tags so that the text remains consistent rendered in html.

See Also

  • No labels