Ctrl+K

Accessing Multi-language in Ajax files and Parsley

Accessing Multi-language in Ajax files via GET query parameter, and using parsley call for the current language

Accessing Multi-language in Ajax files

#

For AJAX "files" (served as /ajax/example), the language can be specified via a GET query parameter. Example: /ajax/example?lang=fr-ca.

A helpful tip for doing this automatically in ajax calls is to use the parsley call for the current language: {{ site.current_lang }}.

Accessing Multi-language in Parsley

#

Accessing content in multiple languages is very simple in Parsley.

You simply access the properties of the page in the same way (page.title for example). Content will automatically be loaded in the correct language based on the current visitors language.

HTML changes based on language

To make a html change specific for the current visitor's language code.

Start Here

We will listen to your needs and walk you through how Zesty can help your team.

Connect with Content Experts

Book a free 15-minute consultation with a content expert. Discuss your application, pain points and requirements. Understand how Zesty's lower total cost of ownership, features, functionality can elevate your business by creating extraordinary digital experiences.

Trusted By

zesty customer logo Sonyzesty customer logo Rocket Leaguezesty customer logo Singlifezesty customer logo Acornszesty customer logo Phoenix Sunszesty customer logo Wattpadzesty customer logo Corner Shopzesty customer logo Bjs

Start by Entering your Email

By submitting your email you agree to our terms and conditions

G2 MOMENTUM LEADER

zesty customer logo zesty customer logo zesty customer logo