# Localizing Paywalls with Dynamic Values

How to display localized paywall text using dynamic values and the device locale, without needing the built-in localization feature.

You can localize your paywall text for multiple languages using dynamic values in the paywall editor. This approach uses the device's locale to conditionally display different text for each language, and works on any Superwall plan.

How it works [#how-it-works]

The paywall editor exposes `device.deviceLocale` (e.g. `en_US`, `fr_FR`) and `device.deviceLanguageCode` (e.g. `en`, `fr`) as built-in variables. By combining these with dynamic values, you can set up rules that show different text depending on the user's language.

Step-by-step setup [#step-by-step-setup]

1. Open your paywall in the editor and click on the text component you want to localize.
2. Click on the text property in the component editor, then choose **Dynamic** from the dropdown. This opens the dynamic values editor.
3. Click **Add Value**, then configure a rule:
   * Set the **if** condition to `device.deviceLanguageCode` **equals** your target language code (e.g. `fr` for French).
   * Set the **then** value to the translated string for that language.
   * Repeat this for each language you want to support. Use the **otherwise** value for your default language (typically English).
4. Apply the same approach to every text component on your paywall that needs localization.
5. Click **Publish** to save your changes. The paywall will now display the correct text based on the user's device language.

For example:

| Condition                               | Then value                    |
| --------------------------------------- | ----------------------------- |
| `device.deviceLanguageCode` equals `fr` | Commencez votre essai gratuit |
| `device.deviceLanguageCode` equals `es` | Comienza tu prueba gratuita   |
| Otherwise                               | Start your free trial         |

> **Tip**

Use `device.deviceLanguageCode` (e.g. `en`, `fr`) when you want to match broadly by language. Use `device.deviceLocale` (e.g. `en_US`, `en_GB`, `fr_FR`) when you need region-specific variants.



Testing localized text [#testing-localized-text]

To test your localized paywall, change your device's language in the system settings and reopen the paywall. The dynamic values will evaluate based on the updated locale.

You can also preview different language states directly in the editor by temporarily changing the value of `device.deviceLanguageCode` in the **Variables** sidebar.

> **Note**

This approach is separate from the built-in localization feature available on the Startup plan, which provides AI-powered translations and a dedicated localization management UI. If you need to localize many paywalls or manage translations at scale, consider using the built-in localization tools instead.