N=21 - Internationalisation - i18n - N+1 Days of MvvmCross

Stuart Lodge · 5K views · 2013 · 38:03

Open on YouTube

Software architecture & designSoftware (other)tutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the reference walkthrough for setting up MvvmCross JSON-based localisation and the Babel sample when they hit problems with translation files.

Recommended by 0 people across 0 different months, 2014 to 2018.

What it is

Episode 21 of Stuart Lodge's 'N+1 Days of MvvmCross' video series, covering internationalisation (i18n) using JSON translation files. It shows the JsonLocalisation plugin on Windows Phone, Xamarin.Android and Xamarin.iOS, with the Babel sample app.

What people said

Cites Alexandre D. · 2014-06 · Stack Overflow · on “Internationalisation in Android application using Xamarin and the MvvmCross framework”

I'am trying to implement internationalisation in my Xamarin application based on the MvvmCross framework. To do that, I follow the Stuart's video [this video] My problem is when i try to use one of the resource I put in my JSON file, the good string is not returned. For example, I have a JSON file ListCustomersViewModel.json in the Assets/InternationalisationResources/Text folder of my Android application which contains : { "MyTitle":"Titre de la page" } So in order to make a link with my TextView, I put this code in the AXML file ListCustomersView.axml : <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="30dp" local:MvxLang="Text MyTitle" android:

Cites Tiny · 2014-09 · Stack Overflow · on “JsonLocalisation - linked translation files in TFS”

I am using Visual Studio 2013 and TFS for source control. My solution contains json files with the translations for my app made with the mvvmcross framework. The mvvmcross JsonLocalisation plugin recommends to link the translation files [this video] from a commen location to the different projects needing them. When trying to shelve or check-in these changes, TFS complains about the translation files not being available in the platform projects.... Do any of you guys have a nice solution to that (one that doesn't include branching)? I'd really like to avoid branching because I then need to merge the files to all my platform projects on every change I make. How do you solve that using TFS?

Cites Tiny · 2014-09 · Stack Overflow · on “JsonLocalisation and WPF cannot find my translation files”

My app runs in WPF and Android (Windows Phone later) with mvvmcross as framework. I implemented localization with JsonLocalisation like the Babel ( N21 [this video] ) example and it is working fine in Android. But whatever I try in WPF I get this message; mvx:Warning: 0,22 Language file could not be loaded for Danish.SettingsViewModel - FileNotFoundException: Unable to find resource file MyAppResources/Text/Danish/SettingsViewModel.json at Cirrious.MvvmCross.Plugins.JsonLocalisation.MvxContentJsonDictionaryTextProvider. LoadJsonFromResource(String namespaceKey, String typeKey, String resourcePath) at >Cirrious.MvvmCross.Plugins.JsonLocalisation.MvxTextProviderBuilder.LoadResources(String >whichLo

Cites user4071320 · 2016-05 · Stack Overflow · on “Xamarin MVVM : Work with just one JSON Folder to change language”

I want to know if we can create just one Localization folder for my application in MVVMCross (Android, IOS, Core) to change the language. In fact, i watching this video/tuto to change my Application Language with MVVMCross: [this video] I downloaded the sample too and i can see, his folder BabelResources is in his Android project, in his IOS Projet, in WPF etc... I can't create just one ressource folder and create just one JSON file with my translation (In my PCL for example) Thank for your help

Cites RadekR · 2018-04 · Stack Overflow · on “Mvvmcross: Text format binding with MvxLang”

Use Tibet binding with local:MvxBind. Let's assume, that you have: BaseViewModel.cs public abstract class BaseViewModel : MvxViewModel { public IMvxLanguageBinder TextSource { get { return new MvxLanguageBinder( Constants.GeneralNamespace, GetType().Name); } } } MainViewModel.cs inheriting from BaseViewModel, with string property Name: public string Name => "Radek"; TextProviderBuilder like in Stuart's N+1 days (no. 21) [this video] JSON translation file with "MyLabel" key { "MyLabel" : "Your name:" } Answer: Then Android layout axml file will contain binding local:MvxBind="Text Language(TextSource,'MyLabel') + ' ' + Name; Click NextCommand" I don't know how to do this with local:MvxLang but the