PHP PollUser Manual Visit PHP Poll →
Settings & maintenance

Translate PHPPoll into your language

Translate the PHPPoll admin panel and poll texts into any language by copying one language file. Step-by-step guide with placeholders, fallback and tips.

All texts that PHPPoll shows – in the admin panel, on the voting forms, in error messages and emails – are stored in one language file. Translating the script means translating that file. No code changes are needed.

Steps

  1. Open the folder lang/ and make a copy of en.php. Name it with your language code, for example de.php, fr.php, es.php or bg.php.
  2. Open the new file in a text editor that saves in UTF-8 (for example VS Code or Notepad++).
  3. Change '_language_name' => 'English' to the name of your language, for example 'Deutsch'.
  4. Translate the text on the right side of each =>. Do not change the keys on the left.
  5. Upload the file and choose the language in Settings → General → Language. Save.

Example

'vote' => 'Abstimmen',
'thank_you' => 'Danke für Ihre Stimme!',
'already_voted' => 'Sie haben bereits abgestimmt.',

Placeholders

Some texts contain %s or %d. They are replaced by names or numbers and must stay in the translation, for example 'n_votes' => '%s Stimmen'. If you need a literal percent sign in such texts, write %%.

Apostrophes and quotes

Texts are wrapped in single quotes. Write a single quote inside a text as \', or use typographic quotes.

What if some texts are missing?

Missing keys are taken from the English file automatically, so you can translate step by step and your site always works.

Where texts appear

Part of the fileWhere the text is used
Public pollButtons, messages, hints and errors seen by voters.
Standalone poll websiteHeadings and share links.
EmailsNotification and test emails.
Login & setup, menu, dashboard…The admin panel.

Use the same file to adjust English wording to your taste: change "Vote" to "Send my answer" or "Thank you for voting!" to your own brand voice.

The language also affects the CSV export headers. See Export poll votes to CSV.

Last updated