- Theme Engine
- Design Principles
- Templates
- EVML Reference
- Output
- Comments
- Operators
- Statements and Declarations
- Built-in Functions
- Built-in Objects
- Account
- Address
- Array
- Boolean
- Branch
- Cart
- CartLine
- Category
- CategoryCollection
- CategoryFilter
- CategoryFilterCollection
- CategoryFilterOption
- CategorySearch
- Collection
- Color
- Contact
- Currency
- Date
- Discount
- Dom
- Event
- EventCollection
- EventSlot
- Image
- Layout
- Locale
- Money
- Number
- Object
- Page
- PageCollection
- PageSearch
- PageSharer
- Pagination
- Postage
- Price
- PriceDiscount
- Product
- ProductCollection
- ProductCustomisation
- ProductDownload
- ProductMedia
- ProductMediaFrame
- ProductPrice
- ProductSearch
- ProductSpecification
- ProductSpecificationValue
- ProductVariation
- ProductVariationOption
- RecentlyViewed
- RegExp
- Request
- Review
- ReviewCollection
- Search
- SearchCollection
- SearchResult
- String
- Tag
- Template
- Url
- Website
- EV Tags
- CSS Pre-processor
- Ajax API
Locale
Extends Object. Represents regional information such as country, language, currency and time settings. The locale system is applicable to websites with international settings.
Properties | |
---|---|
country |
Type String The two character ISO code for the country e.g. GB. |
countryName |
Type String The name of the country. |
currency |
Type String The three character ISO code of the currency for the locale e.g. GBP. |
id |
Type Number The system ID for the locale object. |
isActive |
Type Boolean True if the locale is current. |
language |
Type String The two character ISO code for the language e.g. en. |
languageName |
Type String The name of the language. |
timezone |
Type String The timezone string for the current locale e.g. Europe/London. |
Methods | |
---|---|
branch()
|
Returns Branch This method returns the closest applicable branch for the locale and is for use on international websites using locales or geotargeting. Evance allows you to set a branch against a locale if you wish contact details to differ from your main legal entity set in "My Business". This methods implements the following fallback rules:
This is useful, for example, if you wish to display a different phone number on a US locale to your default GB locale.
Note this is an alternative to |
href([Mixed:url])
|
Returns Url This method returns a locale safe Url that switches the user to a new preferred locale and redirects the user back to the Url supplied, or the current page if not supplied. This is an important method for switching between languages or locales on multi-regional websites that have strict geo-targeting enabled. In the example below we want to cycle through all of the available locales for a multi-regional website and then link to the homepage of each region:
The resulting Urls in the
Note this is the only locale safe method of switching between locales on multi-regional websites with strict geo-targeting. A cookie will be set to save the user's preferred locale on repeat visits to the website. |
manager()
|
Returns Contact This method returns the closest applicable manager Contact for the locale. Evance allows you to set a manager against a locale if you wish contact information to differ from the Account Owner. This methods implements the following fallback rules:
This is useful, for example, if you wish to display contact information should visitors wish to get in contact with the relevant manager for the locale.
Note please exercise caution when displaying manager information on your public website. |