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
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
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