SyliusCon 2025
Early Bird Deal
LogoLogo
πŸ›£οΈ RoadmapπŸ’» Sylius DemoπŸ’¬ Community Slack
  • Sylius Documentation
  • Sylius Plugins
  • Sylius Stack
  • πŸ“–Sylius 2.0 Documentation
    • Organization
      • Release Cycle
      • Backwards Compatibility Promise
      • Sylius Team
      • Sylius Roadmap
  • Getting Started with Sylius
    • Installation
    • Basic Configuration
    • Shipping & Payment
    • First Product
    • Customizing the Shop
    • Customizing Business Logic
    • Using API
    • Installing Plugins
    • Deployment
    • Summary
  • The Book
    • Introduction to Sylius
    • Installation
      • System Requirements
      • Sylius CE Installation
        • Sylius CE Installation with Docker
      • βž•Sylius Plus Installation
      • Upgrading Sylius CE
      • Upgrading Sylius Plus
    • Architecture
      • Architecture Overview
      • Architectural Drivers
      • Resource Layer
      • State Machine
      • Translations
      • E-Mails
      • Contact
      • Fixtures
      • Events
    • Configuration
      • Channels
      • Locales
      • Currencies
    • Customers
      • Customer & ShopUser
      • βž•Customer Pools
      • AdminUser
      • Addresses
        • Countries
        • Zones
        • Addresses
        • Address Book
    • Products
      • Products
      • Product Reviews
      • Product Associations
      • Attributes
      • Pricing
      • Catalog Promotions
      • Taxons
      • Inventory
      • βž•Multi-Source Inventory
      • Search
    • Carts & Orders
      • Orders
      • Cart flow
      • Taxation
      • Adjustments
      • Cart Promotions
      • Coupons
      • Payments
      • 🧩Invoices
      • Shipments
    • Support
    • Contributing
      • Contributing Code
        • Submitting a Patch
        • ⚠️Security Issues
        • Coding Standards
        • Conventions
        • Sylius License and Trademark
      • Contributing Translations
      • Key Contributors
  • The Customization Guide
    • Customizing Models
      • How to add a custom model?
      • How to add a custom translatable model?
    • Customizing Forms
      • How to add a live form for a custom model?
    • Customizing Styles
    • Customizing Validation
    • Customizing Menus
    • Customizing Templates
    • Customizing Translations
    • Customizing Flashes
    • Customizing State Machines
    • Customizing Grids
    • Customizing Fixtures
    • Customizing API
    • Customizing Serialization of API
    • Customizing Payments
      • How to integrate a Payment Gateway as a Plugin?
  • πŸ§‘β€πŸ³The Cookbook
  • How to resize images?
  • How to add one image to an entity?
  • How to add multiple images to an entity?
  • Sylius 1.X Documentation
    • πŸ““Sylius 1.x Documentation
Powered by GitBook
LogoLogo

Developer

  • Community
  • Online Course

About

  • Team

Β© 2025 Sylius. All Rights Reserved

On this page
  • Why Customize Translations?
  • How to Customize Translations
  • Good to Know

Was this helpful?

Edit on GitHub
  1. The Customization Guide

Customizing Translations

Translations in Sylius can be easily customized to match your business needs better. Whether you want to adjust wording for clarity, branding, or localization, you can override default translations in your project.

Why Customize Translations?

You might want to modify translations if you need to: βœ… Change default labels, such as "Last name" β†’ "Surname". βœ… Adjust button text, like "Add to cart" β†’ "Buy". βœ… Localize content to better suit your target audience.

How to Customize Translations

Step 1: Create a Translation File

If you haven’t already, create a translations/messages.en.yaml file for English translations.

πŸ“Œ For other languages, create separate files, such as:

  • Polish β†’ translations/messages.pl.yaml

  • French β†’ translations/messages.fr.yaml

Step 2: Find the Correct Translation Key

If you're unsure which key to override, use the Symfony Profiler:

  1. Open the page where you want to change a translation.

  2. Click the Translations icon in the Symfony Profiler.

  3. Find the message key associated with the text you want to modify.

Example: Changing "Email" to "Username" on the login form.

sylius:
    form:
        customer:
            email: Username

Before/After:

To apply your changes, clear the cache:

php bin/console cache:clear

Good to Know

βœ… You can override translations directly in your application or in a Sylius plugin. βœ… Different languages should be stored in separate translation files. βœ… The Symfony Profiler is a great tool for identifying translation keys.

With these simple steps, you can customize Sylius translations to better fit your project! πŸš€

PreviousCustomizing TemplatesNextCustomizing Flashes

Last updated 3 months ago

Was this helpful?

Before
After