The localization tutorial seems straightforward, but I was wondering if there's a way to have it accept other formats like xliff or json.
Our LocExtension relies on ResourceDictionaries to get the values of the specified keys. There is no way to support other formats in our extension, but you can implement your own
MarkupExtension if you need a different approach.
Also does the system work with a fallback language. Like if the key just isn't in the dictionary will it fall back to the default language?
It can be achieved by merging the default language in the specific language dictionary. For example, if you have a Language-en.xaml (the default language), then you can have a Language-fr.xaml that merges it:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Language-en.xaml"/> <!-- Default language is merged -->
</ResourceDictionary.MergedDictionaries>
<!-- Entries for the FR language -->
</ResourceDictionary>
Also is there a way to switch fonts as well.
Yes, our LocExtension can point to any resource defined in the Source dictionary, even a FontFamily resource:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<FontFamily x:Key="TheFont">Fonts/#Arial</FontFamily>
</ResourceDictionary>
<TextBlock Text="Title" FontFamily="{noesis:Loc TheFont}"/>