This project has moved and is read-only. For the latest updates, please go here.

Compatibility with wpf localize extension

Jan 9, 2015 at 11:26 AM
Edited Jan 9, 2015 at 11: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

it's strings might be found under different ways:
<Window xmlns:lex=""
<Button Content="{lex:Loc Test}" />
<Button Content="{lex:Loc Key=Test}" />
<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?
Jan 10, 2015 at 12:15 PM
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.