sandstorm / Sandstorm.CookiePunch

Neos Package for content-first consent management built on top of klaro.js.
MIT License
5 stars 3 forks source link

Translate Service #16

Closed paavo closed 2 years ago

paavo commented 2 years ago

Is there a way to add a translation for a service? For example i'd like to translate "Foo Tube":

      services:
        footube:
          title: Foo Tube
klfman commented 2 years ago

Hey paavo,

yes, there is! It's implemented with a bit of magic :)

Just do it like this:

   services:
      youtube:
        title: Youtube
        description: Vendor.Site:CookiePunch:services.youtube.description

Where

Screenshot 2022-06-07 at 14 37 57

            <trans-unit id="services.youtube.description">
                <source>Erlaubt die Einbindung von Youtube-Videos.</source>
            </trans-unit>
paavo commented 2 years ago

Thanks for your detailed help @klfman Is there also a "Fusion-Way" as we are using https://github.com/sitegeist/Sitegeist.CsvPO for translations.