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

Other Useful Business Software
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
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