0

Summary: I am using the "+" sign material icon on a page to represent adding a new item.

On the English version of the site, it displays fine. On the Spanish version of the site, it displays "ñ"

Question: Should I not have any text in between the tags? Or should I not put a translation element at all?

I tried looking into this but couldn't find anything through SO or google, I also did not see it on the documentation page: https://material.angular.io/components/icon/overview

<mat-icon (click)="doStuff()" i18n="@@AaBBCcDd_Y2_14">add</mat-icon>

Expected: To keep the "+" sign in both English and Spanish versions of sites.

Actual: Translating to "ñ"

seesharp
  • 101
  • 1
  • 14

1 Answers1

3

You shouldn't be translating the inner text of mat-icon. That text tells MatIcon which icon to load from the icon font - it is like a key. The icon is the same in all languages.

G. Tranter
  • 16,766
  • 1
  • 48
  • 68