Upload your PHP language files, translate the values, and export valid PHP your application can require directly.
<?php
return [
"HELLO_WORLD" => "Witaj świecie!",
"SUBMIT_BUTTON" => "Wyślij",
"auth" => [
"login" => "Zaloguj się",
"failed" => "Nieprawidłowe dane logowania.",
],
"validation" => [
"required" => "Pole :attribute jest wymagane.",
"email" => "Pole :attribute musi być prawidłowym adresem e-mail.",
],
];Unlike JSON or YAML, a PHP array translation file is an executable script: it opens with <?php and ends with a plain return statement. Frameworks that use this format load it the same way they load any other PHP file, with no parsing step at runtime. One file holds translations for one language, commonly named like messages_de_DE.php.
Nested arrays are recognized on import too: a key like LEVEL_1.HELLO_WORLD becomes a real nested PHP array in the file, matching how frameworks like Laravel group related translations together.
LEVEL_1.HELLO_WORLD
LEVEL_1.LEVEL_2.HELLO_WORLD
MY_TRANSLATION_KEYBoth directions
Grouped keys are read as real nested PHP arrays on import, not flattened data.
Choose flat dot-notation keys or nested arrays when downloading, to match your project's style.
Files follow the language-per-file convention frameworks like Laravel already expect.
End-to-end workflow
Upload a neutral messages_en.php file, translate values while keeping the original structure, and export one file per language, ready to drop into your PHP project.
simplelocalize upload \
--apiKey PROJECT_API_KEY \
--uploadFormat php-array \
--uploadLanguageKey en \
--uploadPath ./lang/en/messages.phpmessages_en.php (or Laravel's lang/en/messages.php) to SimpleLocalize. Nested arrays are read and turned into dot-notation keys automatically.auth.login Zaloguj się
auth.failed Nieprawidłowe dane logowania.
validation.required
validation.emailauth.login and auth.failed show up next to each other in the editor, matching the nested structure of the original file."auth" => [
"login" => "Anmelden",
"failed" => "Ungültige Anmeldedaten.",
],simplelocalize download \
--apiKey PROJECT_API_KEY \
--downloadFormat php-array \
--downloadPath ./lang/{lang}/messages.php \
--downloadOptions WRITE_NESTEDWRITE_NESTED so the export matches your framework's structure exactly, ready to drop into lang/{locale}/.For developers
SimpleLocalize reads and writes PHP array files the way your framework already expects them, and gives your team a place to manage the translations behind them.
Export is a clean, valid PHP file your app can require without any post-processing.
Dot-notation keys are recognized as nested arrays on import, and can be exported nested again to match your framework's structure.
Translate new and changed keys with DeepL, Google Translate, OpenAI, Claude or Gemini.
Upload and download PHP language files from the CLI, or automate the same logic through the REST API.

More conversions
Free online converter, no account required. Upload a PHP language file and download it in the format you need.
More on localization workflows and translation file formats.

Stop treating translation as a manual step before release. Learn how to trigger AI translations automatically on every GitHub push, using SimpleLocalize CLI or the GitHub App.

Machine translation often breaks UI strings through missing context, character limits, and grammar rules other languages don't follow. Here's why, and how to fix it.

Why context is the single biggest factor in AI translation quality, and how to structure project context, key descriptions, and glossaries for accurate results.
Laravel and CakePHP both load translations from PHP files that return an associative array, and plenty of custom PHP applications follow the same pattern.
Yes. The exported file is a complete, directly runnable PHP script that your application can require without any post-processing.
Yes. Nested arrays are imported as dot-notation keys automatically, and the WRITE_NESTED download option exports them back as real nested PHP arrays.