PPPHP

Multiple languages

A generated app can speak your users' language — the menu, lists, buttons, dialogs, dates, sign-in pages, the Calendar, Messages and the Admin Area. You decide which languages it offers. Nepali ships with a complete built-in translation; any other language starts in English and you translate it in the Label Editor (or let Generate defaults machine-translate a first draft).

Contents

Turning it on

  1. Open Misc → Project & Landing and press Multiple Languages. Choose a language from the list — names appear in their own script, and ★ marks languages whose whole interface is already translated (Nepali, नेपाली). Any other language works too: type its code (e.g. fr, pt-BR) and name.
  2. Each language carries a flag, shown beside it in the Languages window and worn by the switcher in your app. Every language starts on a sensible one (नेपाली flies 🇳🇵, Français 🇫🇷), so this is only for the ones you disagree with: click the flag to pick another, paste any emoji, or choose the globe for a language no flag represents. A flag you chose is outlined; clearing it hands the language back to the suggested one rather than leaving it blank.
  3. With two or more languages, Show language selector in the app navbar appears and is ticked — users switch language from the navbar, and the choice is remembered for them.
  4. Optional: tick Live translation editing to ship the in-app Translations editor (see below).
  5. Build. Every page now declares its language (<html lang="ne">), so screen readers, spell-checkers and browser translation behave correctly.

A link can also choose the language: add ?pp_lang=ne to any app URL. The parameter is applied, saved for that visitor, and removed from the address bar.

What translates

Everything the app itself says goes through one catalogue of interface strings, grouped so translators can find them:

Label Editor: your words, per language

Open Misc → Label Editor and choose the language at the top. Each tab covers one surface: Page Titles, Table Labels, Field Labels, Placeholders/Tooltips, App Strings (the catalogue above), Menu, Content, Custom Labels, Logo and Cookie.

Example. In Field Labels, choose नेपाली and set tasks.title to शीर्षक. After a build, Nepali users see “शीर्षक” on the Tasks list and forms; English users still see “Title”.

Live translations (no rebuild)

With Live translation editing on, administrators open Admin Area → Translations in the running app. They can edit App Strings, Menu, Tables, Fields, Page Titles and Content (the text on your Designer pages), add or disable languages, and press Generate defaults to machine-translate the empty fields of a tab. Changes apply immediately and survive rebuilds. Generate defaults sends only interface labels — never your records — to a public translation service, so review important strings.

Countries, months and other preset lists

Choice fields that use a built-in preset list show their options in the active language without any work: countries, months and weekdays come from the server's international data (PHP intl) for almost every language, and gender, marital status, salutation and Yes/No ship with Nepali. Only the label changes — the stored value (for example the country id) is the same in every language. Override any of them in the Content tab.

Dates and times

Dates on lists, view pages, filters, the Calendar and the date pickers use the active language's month and weekday names and AM/PM words — “Oct 5, 2026” is shown as “अक्टोबर 5, 2026” in Nepali. The stored value never changes; only how it is shown. For Bikram Sambat dates, use the Nepali Date Picker field control.

What stays as written

For developers: pp_t, PP_T and pp_ct

Use the same dictionary in your own events, custom files and pages:

<?php
// PHP (events, custom files) — key, then the English fallback
echo pp_t('ui.save', 'Save');
echo str_replace('%n%', $count, pp_t('ui.n_records', '%n% records'));
echo pp_ct('Our services');          // Designer-style content text, translated per language
// Browser — every generated page defines these
const lang = window.PP_LANG;                         // 'ne'
const msg  = window.PP_T('ui.delete_record_q', 'Delete Record?');

Add your own keys under Custom Labels in the Label Editor and read them the same way.

Checklist