Hi,
I'm trying to add some localization to m app, following this guide and i keep getting this exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
on the Line global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(LoginPage));
in LoginPage.xaml.d.cs.
So I assume theres something wrong with the loginpage.xaml:
And I guess the <Label Text="{i18n:Translate LoginTitle}"
or xmlns:i18n="clr-namespace:ServiceApp;assembly=ServiceApp">
are where the money's at, but I don't see any difference to the examples given in the guide. Namespaces should also be correct, with TranslateExtension being in said same namespace.
Any ideas on where the error lies or how i can track it down?
edit:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ServiceApp.LoginPage"
xmlns:i18n="clr-namespace:ServiceApp;assembly=ServiceApp">
<ContentPage.Padding>
<OnPlatform x:TypeArguments="Thickness"
iOS="20, 100, 20, 20"
Android="20, 100, 20, 20"/>
</ContentPage.Padding>
<StackLayout
Spacing = "15"
VerticalOptions="Start"
Orientation="Vertical"
HorizontalOptions="FillAndExpand">
<Label Text="{i18n:Translate LoginTitle}"
HorizontalOptions="Center"
Font="28"/>
</StackLayout>