Php Xliff (xliff, xlf)
Laravel uses PHP array files for localization, stored in the lang directory. Each locale has its own subdirectory — lang/en, lang/fr, lang/de — containing one PHP file per translation namespace. The file name becomes the namespace: auth.failed resolves to the failed key in the auth.php file of the current locale. Laravel's trans helper and double-underscore shorthand accept dot-notation keys to traverse the nested structure.
Laravel language files return a PHP associative array. Keys can be short identifiers or full English strings depending on whether you use the short key or string key approach. Nested arrays create sub-namespaces. Interpolation uses colon-prefixed variable names — a colon followed immediately by the variable name is replaced at runtime with the provided value.
Best practice: prefer short keys over embedding full English strings as keys for better maintainability. Use Laravel's artisan lang:publish command to publish vendor package language files before customising them. Keep namespace files focused — auth.php for authentication, validation.php for form validation. Language Monster supports Laravel PHP Array format natively and preserves nested array structure through translation.
