I18N-Portable | Simple and cross platform internationalization/translations | Form library
kandi X-RAY | I18N-Portable Summary
kandi X-RAY | I18N-Portable Summary
Simple and cross platform internationalization/translations for Xamarin and .NET
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of I18N-Portable
I18N-Portable Key Features
I18N-Portable Examples and Code Snippets
Community Discussions
Trending Discussions on I18N-Portable
QUESTION
I'm working on a cross platform app using Xamarin forms in VS 2017, employing the I18n-portable NuGet-Package for internationalization (see http://xleon.net/localization/xamarin/pcl/share-locales/i18n/portable/dotnet/2017/02/09/easy-and-cross-platform-localization-for-xamarin-and-dotnet/). I got everything working so far, except for one thing.
Unfortunately, I am stuck on the last part where - according to the package readme - I need to create a proxy object on the baseviewmodel. I just don't know what to do here and no documentation on the web seems to help me with that.
What/where is the baseviewmodel?! Is it in App.xaml.cs
of my example PCL solution? This is the code that the author of the package proposes to integrate:
ANSWER
Answered 2017-Jul-27 at 13:31For the BaseViewModel
you will need to use an MVVM framework which is dependent on ViewModels. You then create a custom base class that your other view models inherit from which implements this. It is not something Xamarin hands you out of the box as MVVM is not a must when using Xamarin Forms and there are a number of MVVM frameworks out there.
The error you're getting basically says that the call to I18N.Current
returns an object of type II18N which is an interface that you're assigning to an explicit type. You could try changing it to:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install I18N-Portable
In your PCL/Core project, create a directory called "Locales".
Create a {languageCode}.txt file for each language you want to support. languageCode can be a two letter ISO code or a culture name like "en-US". See full list here.
Set "Build Action" to "Embedded Resource" on the properties of each file
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page