This project has moved. For the latest updates, please go here.

Compatibility with wpf localize extension

Jan 9, 2015 at 10:26 AM
Edited Jan 9, 2015 at 10:27 AM
Thank you for your project, it's really awesome!

I have a small issue with detect code references. I'm using wpf localize extension https://github.com/SeriousM/WPFLocalizationExtension

it's strings might be found under different ways:
<Window xmlns:lex="http://wpflocalizeextension.codeplex.com"
        lex:LocalizeDictionary.DesignCulture="en"
        lex:ResxLocalizationProvider.DefaultAssembly="MyAssembly"
        lex:ResxLocalizationProvider.DefaultDictionary="MyResource">
<Button Content="{lex:Loc Test}" />
<Button Content="{lex:Loc Key=Test}" />
</Window>
or
<Button Content="{lex:Loc Test}" />
<Button Content="{lex:Loc Key=Test}" />
<Button Content="{lex:Loc MyAssembly:MyResource:Test}" />
<Button Content="{lex:Loc Test, Assembly=MyAssembly, Dict=MyResource}" />
<Button Content="{lex:Loc Key=Test, Assembly=MyAssembly, Dict=MyResource}" />
Do you think it would be possible to make code detect reference even with WPFLocalizationExtension?
Coordinator
Jan 10, 2015 at 11:15 AM
It will be probably hard to cover every case, but if you stick to only a few of the patterns and use the same name space always, adding some simple regular expression can easily handle this.
Since this is too flexible, I don't think it's possible to provide a default pattern, so you have to configure it by your own.

I prefer the {x:Static ...} approach, it's straight forward, simple and robust.