The Translation component provides tools to internationalize your application. The term “internationalization” (often abbreviated i18n) refers to the process of abstracting strings and other locale-specific pieces out of your application into a layer where they can be translated and converted based on the user’s locale (i.e. language and country). For text, this means wrapping each with a function capable of translating the text (or “message”) into the language of the user. Enable and configure Symfony’s translation service. Abstract strings (i.e. “messages”) by wrapping them in calls to the Translator (”Basic Translation”). Create translation resources/files for each supported locale that translate each message in the application. Determine, set and manage the user’s locale for the request and optionally on the user’s entire session. The locale used in translations is the one stored on the request. This is typically set via a _locale attribute on your routes.

Features

  • With the Symfony Translation component, creating an internationalized application no longer needs to be a painful process
  • Abstract messages in your application by wrapping each in the trans() method
  • Translate each message into multiple locales by creating translation message files
  • Symfony discovers and processes each file because its name follows a specific convention
  • Manage the user’s locale, which is stored on the request
  • The user’s locale can also be set on the user’s session

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Translation Component

Translation Component Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Translation Component!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Computer Aided Translation (CAT) Software

Registered

2021-09-07