--- title: Internationalization (i18n) description: Guide for using internationalization with FNE Client --- # Internationalization (i18n) This guide shows you how to use internationalization with FNE Client for error messages and translations. ## Overview FNE Client supports internationalization for error messages and translations. Supported languages are French (fr) and English (en). ## Configuration For Laravel / Symfony / Native PHP: ```php // config/fne.php return [ 'locale' => env('FNE_LOCALE', 'en'), // 'fr' or 'en' ]; ``` ## Usage Error messages are automatically translated according to the configured locale: ```php // Locale = 'en' try { $result = FNE::invoice()->sign($data); } catch (ValidationException $e) { echo $e->getMessage(); // Message in English } // Locale = 'fr' // Messages will be in French ``` ## Change Locale ### Globally ```php // config/fne.php 'locale' => 'fr', // Change global locale ``` ### Per Call Locale is determined by global configuration. To change locale per call, you must configure the translator: ```php use Neocode\FNE\i18n\Translator; $translator = new Translator('fr'); // French locale // Use the translator in your code ``` ## Translated Messages All error messages are translated: - **Validation**: Field validation messages - **API**: API error messages - **Exceptions**: Exception messages ## Next Steps - [Error Handling](/docs/guides/error-handling) - Handle errors with translated messages - [Configuration](/docs/getting-started/configuration) - Configure locale > [!info] > **Need help?** Check out the [complete documentation](https://fne-client.neocode.ci/) or [open an issue](https://github.com/neocodesupport/fne-client/issues) on GitHub.