Skip to content

Use localization string in a custom theme

Lacro59 edited this page Feb 9, 2021 · 3 revisions

For use and see in theme editor a localisation string from plugin, you must get the "LocSource.xaml" and rename it.

And you must add and reference it in Blend.

After, the localization string is called with "DynamicResource". It's possible to associate with a converter for auto-hide when the plugin is not loaded:

<TextBlock Text="{DynamicResource LOCSuccessStoryAchievements}" Margin="0,15,0,5"
            Style="{DynamicResource BaseTextBlockStyle}"
            Visibility="{Binding RelativeSource={RelativeSource Self}, Path=Text, 
   Converter={converters:StringNullOrEmptyToVisibilityConverter}}"/>

Warnings The localization file is keep with the Playnite toolbox. But there is no impact because it is not used.