I am investigating the internationalisation of my Xamarin mobile application. We use Realm as the local storage.
Does anyone know the status of the locale support in Realm, or of any limitations in this regard.
Thanks in advance.
I recommend you to use resx files for localization. This is the documentation link where you can find some samples.
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/localization/text?pivots=windows
other option could be using json files for each language that you want to support.
You can use IMarkupExtension to set the key in the xaml and with the IMarkupExtension class return the correct value depending your device language.
Text="{locale:YourLocalizationMarkupExtension Name}"
Related
I'm looking for a way to persist settings (KVPs) in a Xamarin Forms app.
I'd like the settings to be easily bound and notified, very much like the SimpleSettings NuGet. The only problem with SimpleSettings is that it doesn't support UWP. Any ideas on a package that supports all.
Thanks
Take a look at SettingsPlugin by James Montemagno. It's supported on all platform and uses the native setttings API's (NSUserDefaults, SharedPreferences, etc) in the background.
Here's the documentation on how to get started: https://jamesmontemagno.github.io/SettingsPlugin/
I am new to Xamarin. Can someone point me to a way to read existing SMSs using Xamarin Forms.
I know we can do it using Android specific libraries (and probably with iOS specific libraries as well). But, I want to use a library that will help me avoid using platform specific library.
You will have to use platform specific code for this. Remember; all libraries out there actually are platform specific code but just offer you an abstraction. This includes Xamarin.Forms itself.
As mentioned by Jason in the comments, you aren't going to be able to do this on iOS altogether, they do not allow to read or sends texts directly. So you should probably rethink what you are trying to do.
I am developing a multi-platform app with Xamarin Forms. I need to support Touch ID/fingerprint authentication for both the iOS and Android platforms. How can I do this? I am new to Xamarin.
I've developed a Plugin for this. It's available on NuGet, too. Feel free, to drop an issue, if you miss something, or found an error.
https://github.com/smstuebe/xamarin-fingerprint
In general: There are alot of Plugins that abstract platform specific behavior. Before you write something on your own, just google for "<feature> xamarin plugin". It will safe much time.
You will need to use a Dependency Service for platform-specific behavior. Look to the linked guide as a starting point.
I am developing an application using xamarin.android, xamarin.ios and windows phone 8.1 silver light. I am using an encrypted data and want to decrypt data in PCL project. For encryption AesCryptoServiceProvider class has been used. I want to decrypt my data in PCL project but not found any library for doing this. The above mentioned class is worked well in Android and ios project but I am not be able to use in windows phone project. Any help regarding this is much appreciated.
Thanks in advance
Dependency injection/IoC is your friend. Basically you would implement an interface in PCL and implement it at OS level with whatever type is there that does the job.
Have a look at PCL Crypto. It probably supports the functionality you need.
I am working on a VB6 application. I need to get the regional settings options like
Location information
Standards and formats
Default input language
Language for non-unicode language
Is there any API available for this?
Thanks.
You can use GetLocaleInfo for this.
I found this example to be useful.