For the complete documentation index, see llms.txt. This page is also available as Markdown.

Translations

The bundle leverages on Symfony Translation component if available. The texts you pass for almost all names, short names, descriptions, labels... are translation keys.

/config/packages/pwa.yaml
pwa:
    manifest:
        enabled: true
        name: "app.name"
        short_name: "app.short_name"
        start_url: "/index.html"
        displa": "standalone"
        background_color: "#ffffff"
        theme_color: "#4285f4"
        shortcuts:
            - name: "app.feature1.shorcut.name"
              short_name: "app.feature1.shorcut.short_name"
              description: "app.feature1.shorcut.description"
              url: "/start-chat"
              icons":          
                - src: "icons/feature1-96x96.png"
                  sizes: [96]

Translatable values

The following values are translation keys. The domain is pwa.

Component
Values

Manifest

  • name

  • short_name

  • description

  • categories

  • start_url

Screenshot

  • label

Share Target

  • title

  • text

Shortcut

  • name

  • short_name

  • description

Widget

  • name

  • short_name

  • description

How To?

This feature relies on the framework.enabled_locales to generate static manifest files. Please refer to the Symfony documentation for more information.

To enable it, the manifest public URL shall contain the placeholder {locale}.

Example:

When done, the Twig function should get the locale to serve the translated version of the manifest.

Now you can have translation files for each locale you support:

Last updated