Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Localized Fields and Attributes

Localized Fields and Attributes

Some fields contain localized values. To include a localized field in your query, you must specify the language that you want to search. For example, the following query matches the product whose French name is Canon - Kit d'accessoires pour appareil photo:

FIND Product WHERE ProductName[fr] = 'Canon - Kit d\'accessoires pour appareil photo'
      

The value between the square brackets indicates the language. You can use either the two-letter language code or the full language name.

Note:

The apostrophe in d'accessoires must be preceded by a backslash. Whenever a string contains the apostrophe character, it must be escaped with a backslash. Otherwise it will be interpreted as the end of the string and cause a parsing error when the query is validated.

Attributes may also contain localized values. For example, the following query matches all products that have the English value of the Lens System / Type attribute set to Zoom lens:

FIND Product WHERE AttributeName{Lens System / Type}[en] = 'Zoom lens'