Symfony Free
BySymfonyVerified Author

Upload your files for translation directly into the Crowdin project and synchronize the translations with your Symfony application.

Try Crowdin

Symfony Translation and Localization with Crowdin

Copy link

Symfony is a free and open-source PHP framework for building modern web applications. It is a comprehensive framework that provides a wide range of features.

When using external translators to translate your application, you must send them the new contents to translate frequently and merge the results back in the application.

Localize your source files with integration for Crowdin. Instead of doing this manually, Symfony provides integration with Crowdin. Once localization is complete in Crowdin, you can push and pull translations to/from Crowdin and automatically merge the results into your application.

Setup

Copy link

Before pushing/pulling translations to Crowdin, you must install the package that provides integration:

composer require symfony/crowdin-translation-provider

You'll now have a new line in your .env file that you can uncomment:

# .env
CROWDIN_DSN=crowdin://PROJECT_ID:API_TOKEN@default

Note: for Crowdin Enterprise, you need to specify the organization domain in the DSN: crowdin://PROJECT_ID:API_TOKEN@ORGANIZATION_DOMAIN.default (e.g., for organization https://your_organization.crowdin.com, set the your_organization as ORGANIZATION_DOMAIN).

To enable a translation provider, customize the DSN in your .env file and configure the providers option:

# config/packages/translation.yaml
framework:
    translator:
        providers:
            crowdin:
                dsn: '%env(CROWDIN_DSN)%'
                domains: ['messages']
                locales: ['en', 'fr']

Note: If you use Crowdin as a provider and some of your locales are different from the Crowdin Language Codes, you have to set the Custom Language Codes in the Crowdin project for each of your locales, in order to override the default value. You need to select the "locale" placeholder and specify the custom code in the "Custom Code" field.

Read more about Symfony integration for Crowdin.

Screenshots

Copy link

Screenshot Screenshot

Crowdin is a platform that helps you manage and translate content into different languages. Integrate Crowdin with your repo, CMS, or other systems. Source content is always up to date for your translators, and translated content is returned automatically.

Learn More
Categories
Development
Works with
  • Crowdin Enterprise
  • crowdin.com
  • Connectors.Center
Details

Released on Jun 9, 2021

Updated on Jan 25, 2024

Published by Symfony

Identifier:symfony