gcds-components icon indicating copy to clipboard operation
gcds-components copied to clipboard

Are GC footers translateable?

Open nickwang14 opened this issue 10 months ago • 1 comments

https://design-system.alpha.canada.ca/en/components/footer/code/

<gcds-footer
  contextual-heading="Contextual navigation"
  contextual-links='{ "Why GC Notify": "#", "Features": "#", "Activity on GC Notify": "#" }'
  sub-links='{ "Why GC Notify": "#", "Features": "#", "Activity on GC Notify": "#" }'
  lang="fr"
>
</gcds-footer>

From the template here, I'm wondering if there's a way to localize the sub-links or contextual-headings or contextual-links

We're using an angular system and usually translate using: https://v17.angular.io/guide/i18n-overview

nickwang14 avatar Feb 24 '25 21:02 nickwang14

@nickwang14 Thanks for asking! We have tested the localization of our components for our web, react and vue packages, but unfortunately we don't have a great example yet for a full angular app.

The components have a property called lang which you can set to either en or fr to set the proper locale. The properties themselves can be set to whichever string or object you need them to be. I think it would be possible to use $localize with those properties. You may have to mark them specifically for translation. If you could give it a try, we'd appreciate it, and let us know if you encounter issues!

daine avatar Feb 26 '25 00:02 daine