Visual Studio CodeVS Code Extension available! Install now

Translate PHP array files online

Upload your .php files to SimpleLocalize, add languages, auto-translate and download one .php file per language in seconds.

Translate PHP file
No credit card required14-day free trialTracking-free service
<?php return [ "HELLO_WORLD" => "Hello world!", "MY_TRANSLATION_KEY" => "This is my translation message!" ]; ?>
<?php
return [
    "HELLO_WORLD" => "Hello world!",
    "MY_TRANSLATION_KEY" => "This is my translation message!"
];
?>

What is the PHP array format?

A PHP file that returns an associative array of translations. Laravel, CakePHP and many custom PHP apps load language files in this form.

It is used by Laravel, CakePHP, PHP. SimpleLocalize reads and writes it natively, so you keep your existing project structure. Format value for the CLI and API: php-array. Read the format documentation.

How to translate PHP array files

  1. Create a free account and a project. The Community plan covers small apps with no credit card.
  2. Import your .php file in the web editor, or push it from the terminal with the CLI.
  3. Add target languages and run auto-translation. Use DeepL or Google Translate for speed, or OpenAI, Claude and Gemini with your own API key for context-aware translations.
  4. Review in the editor with QA checks, glossary and screenshots, then download the PHP files or publish them to the translation hosting CDN.

Sync PHP files from CI

Add a simplelocalize.yml to the repository and run simplelocalize upload and simplelocalize download in your pipeline or GitHub Action:

# simplelocalize.yml apiKey: YOUR_PROJECT_API_KEY uploadFormat: php-array uploadPath: ./locales/{lang}.php downloadFormat: php-array downloadPath: ./locales/{lang}.php
# simplelocalize.yml
apiKey: YOUR_PROJECT_API_KEY
uploadFormat: php-array
uploadPath: ./locales/{lang}.php
downloadFormat: php-array
downloadPath: ./locales/{lang}.php

Convert PHP to other formats

The same project can export translations in more than 30 formats, and the free online converter works without an account:

All conversions and free translation tools.

Start translating PHP files

  • Native PHP array import and export
  • Auto-translation with DeepL, Google, OpenAI, Claude and Gemini
  • Translation editor, QA checks, CLI and CDN on the free plan
Start for free
No credit card required5-minute setup
"The product
and support
are fantastic."
Laars Buur|CTO
"The support is
blazing fast,
thank you Jakub!"
Stefan|Developer
"Interface that
makes any dev
feel at home!"
Dario De Cianni|CTO
"Excellent app,
saves my time
and money"
Dmitry Melnik|Developer