How to use resource files in the XAML file (Xamarin)

1

I'm trying to use resource files in my Xamarin Forms project but I'm not sure how to reference the file string. Ex: <Label Text="MyApp.Resources.MinhaString" /> . Does anyone know how to do it?

    
asked by anonymous 02.12.2017 / 17:55

1 answer

1

Follow the procedure described in link and access the resource file using the TranslateExtension class .

Ex: <Button Text="{i18n:TranslateExtension Text=AddButton}" /> or to be less verbose hide the word extension <Button Text="{i18n:Translate Text=AddButton}" />

    
04.12.2017 / 14:35