Skip to main content

Localize your perks

Show your perks experience in your customer's language, so a Spanish- or French-speaking customer sees the buttons, labels, and perk copy translated instead of English.

Paylode keeps English as the source language and maintains Spanish (ES) and French (FR) translations of the strings that appear in a perks surface. You set the language on the page — data-lang on an embed, lang on a hosted address — and Paylode renders it translated, with English filling in for anything not yet translated. No translation work happens on your side, and the wording stays consistent across every surface.

Before you begin

  • Decide which surface you're localizing — an embedded page, a hosted page, or a custom page you render yourself. The first two are configuration; the last one is code.
  • Know your target locale. Supported targets today are ES and FR; English is the source and is always available as the fallback.

Set the language on your page

If you use the drop-in embed (see Embed a perks page), set the locale on the container element with data-lang:

<div
id="paylode-iframe-container"
data-slug="example-rewards"
data-lang="es"
></div>

If you use a Paylode-hosted page, pass the locale as the lang query parameter on the page URL:

https://example-rewards.perkspulse.com/?lang=fr

In both cases Paylode renders the page's UI strings and localizable content in the requested language and falls back to English for anything not translated. You don't call the vocabulary API yourself.

Verify

  • Load your surface with a target locale and confirm the UI strings render translated (for example, the Redeem button reads Canjear in Spanish).
  • Introduce a string you know isn't translated yet and confirm it renders in English rather than breaking or showing an empty label.

Troubleshooting

  • A label renders in English when you expected a translation. That string isn't in the vocabulary for that language yet, so the fallback kicked in. This is expected behavior — keep the English fallback in place so new strings always render.