Adding StringFormat to TranslateExtension
If you're tasked with adding localization to your Xamarin Application you may start with the TranslateExtension example from Xamarin. This allows you to add String Resources to your AppResources.xaml file and consume them using XAML or C#.
This solution works well until you need to append a colon or any character to one of your String Resources. In the example below, we have Name & Special Ability on both pages. On the List Page the text is appended with a colon.
Now let's take a look at what the String Resources & XAML would look like:
As you can see, this is going to lead to duplicate resources which in a larger application would be a nightmare to maintain.
Adding String Format Property to Translate Extension
This part is rather simple. You'll need to add a StringFormat property to the TranslateExtension.cs class and apply the format in the ProvideValue method.
What happens if you wait too long to replace old technology?