PHP
NeoIQ Localize supports PHP localization files using a modern array-based format. Perfect for PHP applications, it handles nested structures while maintaining type safety with strict types enabled.
Setting Up
First, create a neoiq-localize.json config file in your project root:
File Format
Your PHP translation files should return an array. Here's an example structure:
declare(strict_types=1) is completely optional and is only used to ensure type safety.
Translating
With your config set, run:
When you run this command, NeoIQ Localize will:
- Parse your source PHP files (e.g.,
lang/en/*.php) - Detect new or modified translation strings
- Generate translations for target languages
- Create or update target language PHP files (e.g.,
lang/sv/*.php) - Preserve PHP structure and nesting
- Maintain strict types declaration
- Keep code formatting consistent
How is this guide?
Edit on GitHub
Last updated on