Skip to main content
Nayax Core serves your extension to users in multiple languages. To participate in this system, your app calls the Nayax translation API at startup, retrieves the translated strings for the current user’s language, and uses them throughout your UI. You do not manage language files: Nayax manages translations for all registered apps centrally.

Prerequisites

  • Your Core Extension is registered with Nayax and has a model name (for example, Apps/YourAppName)
  • Your app is served through the Nayax Core reverse proxy (required for the translation API to be reachable; see Reverse proxy requirement)
1

Call the translation API at startup

When your app loads, fetch translations from the Nayax Core translation endpoint:
The endpoint returns a JSON object mapping original English strings to their translations in the user’s language:
If no translation exists for a string, the key is omitted. Your app falls back to the original string in that case.Here is an example implementation that fetches and stores translations at startup:
The Nayax backend stores translation keys in lowercase, even if your original strings are mixed case. Always normalize stored keys and lookups to lowercase, or translations will not match.
2

Implement a translation function

Create a function that looks up a string in the loaded translations and falls back to the original if no translation is found:
Call loadTranslations at app startup and store the result so t can use it:
3

Wrap your UI strings

Every user-visible string in your UI must go through t(). This includes labels, buttons, table headers, placeholders, empty states, and error messages.
Wrap:
  • Labels and headings: t('Welcome'), t('No data available')
  • Button text: t('Save'), t('Cancel')
  • Placeholders, empty states, and error messages: t('Search...')
Do not wrap:
  • Status values used in code comparisons: if (status === 'completed')
  • CSS class names: className="bg-green-500"
  • Console or debug messages: console.log('Debug info')
  • Template literals with variables: t(\Machine $`)` — dynamic keys cannot be matched reliably
4

Use your model name consistently

The model name in your API call must exactly match the model registered with Nayax. If it does not match, the API still returns HTTP 200 but with an empty object — no error, no translations, and no indication of what went wrong.
Common mistakes:If your app loads but all text shows in English, verify that your model name matches the one Nayax registered exactly, including capitalization.
5

Provide your strings to Nayax

Nayax needs a list of all translatable strings from your app in order to add translations for each supported language. Provide this list to Nayax when you register your app or when you add new strings.

Reverse proxy requirement

The translation endpoint uses an absolute path that resolves against your app’s origin. Your app must be served through the Nayax Core reverse proxy for this to work. If the translation endpoint returns 404, the most likely cause is that your app is being accessed directly rather than through the Nayax Core reverse proxy. Contact Nayax to verify your reverse proxy configuration.

Troubleshooting

If translations are not working as expected, use the table below to identify the cause:

What’s next

Role-Based Visibility

Declare which UI elements admins can show or hide by role.

Authentication

Understand how your app receives the JWT token from Nayax.