Quantcast
Channel: WPF Localization Extension
Viewing all 286 articles
Browse latest View live
↧

Closed Unassigned: Cannot use Loc in Style Setter [9305]

$
0
0
This is the issue as reported in Issue 2574, except using Loc and VS2012.

When trying to set Setter.Value to Loc yields the following in VS 2012: 'LocExtension' is not valid for Setter.Value. The only supported MarkupExtension types are DynamicResourceExtension and BindingBase or derived types.

Comments: The WEP LocalizeExtension is basicly for localization and controlling some characteristics of an application depending on the selected culture. It is not designed to be used as styling-extension.
↧

Commented Unassigned: Cannot use Loc in Style Setter [9305]

$
0
0
This is the issue as reported in Issue 2574, except using Loc and VS2012.

When trying to set Setter.Value to Loc yields the following in VS 2012: 'LocExtension' is not valid for Setter.Value. The only supported MarkupExtension types are DynamicResourceExtension and BindingBase or derived types.

Comments: I ment WPF LocalizeExtension, not WEP :)
↧
↧

New Post: "key: " in designer

$
0
0
After configuring my window every localized text is displayed in designer like this: "key: MyKeyName". Why is that?

In window header I have:
lex:LocalizeDictionary.DesignCulture="pl-PL"
lex:ResxLocalizationProvider.DefaultAssembly="AssemblyName"
lex:ResxLocalizationProvider.DefaultDictionary="Strings"
control:
<MenuItem Header="{lex:Loc Menu_Tools}" />
Everything is ok when control is localized like this:
<MenuItem Header="{lex:Loc AssemblyName:Strings:Menu_Tools}" />
Is there any solution for this issue?
↧

New Post: Wierd problem

$
0
0
Hi,

I think that I have the same issue. I have multiple independent modules with its own resx files (eg. one english and one swedish) and it has worked great defining the default assembly in the Xaml views until now. What happens is that I have the same resource key name in two separate resx files for two separate dlls. If I load the view in the on assembly it looks ok and shows the correct resource but when i load the second module it uses the resource from the first dll even though ive specified the correct default assembly in both.

Does it merge all already loaded resources with the new resource and only add missing keys? Is it possible to unload old resources prior to loading new?

//Christian
↧

New Post: VB6 "Out Of Memory" when consuming via COM Interop

$
0
0
I added WpfLocalizationExtension to my project, and it works just fine when run natively using a C# Windows Form for viewing. I use this Windows Form for quick debugging, but this xaml is meant for consumption from VB6. This C# Windows Form is loading a C# User Control which also has COM Interop code so it can be consumed from VB6.

This was all working well until I added WpfLocalizationExtension to my project. Now whenever I try to add the control to a form in VB6, I get "OUT OF MEMORY".

I have stripped the XAML down to just the bare essentials... only a blank grid below the root UserControl. If that user control contains any calls to .LocalizeDictionary or .ResXLocaliztionProvider, the VB6 error occurs.

Can anybody help. I really like this tool and already spent two days localizing this one complex Xaml view.
↧
↧

New Post: binding with localized fallbackvalue

$
0
0
is it possible to localize the binding-fallbackvalue?
<TextBlock Text="{MyProperty, FallbackValue={lex:Loc FallbackValue}}" />
--> Fallbackvalue keeps the text "Key: FallbackValue"
↧

New Post: Prism and WPF Localization Extension generel questions

$
0
0
Hi

I am quite newbie to WPF but trying to get my head around the localization task in a little project I am beginning to work on.

First I tried making a small isolated testproject using WPF localization Extension and everything works like a charm here. (VS2012)

But when I try to do the same with my real project the translation is only working i runtime after I changed the culture once. In designtime i see no translation, and also I have to pinpoint the localization key in each translated properties.

So I just want to ask in generel. Are there any known issues with WPF Localization Extension to the listed facts of my project:
  1. I am using VS2012.
  2. I build for x86 due to some external dll's I am using
  3. I use the Prism framework
  4. .resx files are placed in another assembly than where used.
Hope someone knows what could be the issue that I am facing.
↧

New Post: "key: " in designer

$
0
0
Same problem here. Thanks for posting a workaround!
↧

Commented Feature: Retrieve extension that is bound to an object's property [9304]

$
0
0
The engine should be able to get the extension instance, that is already bound to a certain object's property.
Comments: Given a dependency object such as a label that has been bound to a localised resource, it would be very helpful if there were an attached property, extension method or something which we could call on to retrieve the LocExtension. The reason I want to access this is to get the resource key, so that it can be associated with some custom config relating directly to that piece of text.
↧
↧

New Post: visual studio 2012: designer crashes

$
0
0
hello, devs!

i wanted to localize my application that i'm working on and i used this extension. i needed to read the 'idiot's guide' to get it into my application. but now i've got the following problem:

the designer crashes, when i type in these three lines:
xmlns:Engine="clr-namespace:WPFLocalizeExtension.Engine;assembly=WPFLocalizeExtension"
Engine:LocalizeDictionary.DesignCulture="de-DE"
xmlns:lex="clr-namespace:WPFLocalizeExtension.Ext
it shows a 'Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteException'. sometimes it says something like
The file or assembly "XAMLMarkupExtensions, Version=1.1.6.3, Culture=neutral, PublicKeyToken=null" or an depencedy couldn't be found.

at WPFLocalizeExtension.Engine.LocalizeDictionary.Finalize()
(sorry for bad translation).

debugging works, but the localized texts aren't shown.

i already tried adding the 'XAMLMarkupExtensions' to the reference but it didn't work. also putting it in the same directory.

hope, someone can help.

using:
  • visual studio 2012
  • .net framework 4.0
  • vb.net
↧

New Post: Enum localization

$
0
0
If I am not mistaken this only works with a single item, if I want to use a combobox I am forced to use the provided EnumComboBox or extend a 3rd party combobox the same way you did. I cannot use the locProxy for a list?

Something like:
public Array EnumValues { get; set; }

EnumValues = Enum.GetValues(typeof(Flag));
<lex:LocProxy Source="{Binding EnumValues}" x:Name="Proxy" PrependType="True" />
<3rdPartyComboBox ItemsSource="{Binding ResultList, ElementName=Proxy}" SelectedItem="{Binding Result, ElementName=Proxy}" />
In my understanding the locproxy could provide both the list of enums and the selected item and let it bind to any list data control like combobox, listbox, datagrid... they all share the itemssource / selecteditem pattern.
Additionaly the locproxy could get a "SelectedItem" dependency property itself to write the enum back to the origin datasource.

If something like this is already possible pls help a blind man out. :)
↧

New Post: Enum localization

$
0
0
I would like to request a little improvement for accessing it in code behind.

I am trying to get a simple string out of the extension, and I think the neccessary steps to achieve this are unnessary.
What I am doing now is:
1.) Declaring a string variable
2.) Initializing the locextension with "Assembly:Dictionary:Key" in the constructor
3.) Call the "ResolveLocalizedValue" method with the string property as an out parameter

I think this code kinda gets ugly when you have several string outputs in a row and have to repeat the steps over and over again.
For example:
            string result = "";
            LocExtension loc = null;

            if (state == State.Active)
            {
                loc = new LocExtension("Assembly:Strings:State_Active_MessageBox");
                loc.ResolveLocalizedValue(out result);
                MessageBox.Show(result);
            }
            else if (state == State.Passive)
            {
                loc = new LocExtension("Assembly:Strings:State_Passive_MessageBox");
                loc.ResolveLocalizedValue(out result);
                MessageBox.Show(result);
            }
            else if (state == State.SemiActive)
            {
                loc = new LocExtension("Assembly:Strings:State_Passive_MessageBox");
                loc.ResolveLocalizedValue(out result);
                MessageBox.Show(result);
            }
//and so on....
In my example I could wrap the code in a own method and call it, and thats why I want to request it as an improvement to make it even easier to use.
It would be great to have a static method for the class LocExtension, which simply returns a string without the need of an out parameter like this:
LocExtension.GetLocalizedValue("Assembly:Strings:State_Active_MessageBox");
Which kills the need or declaring the string, initializing a variable and can be done in a one liner.
And again, sry if thats already possible and I am just blind.
↧

New Post: Dynamic resource dll loading

$
0
0
Hi.
Is there any changes in recent releases that could allow this?
↧
↧

Created Unassigned: LocExtension.ResolveLocalizedValue method is not thread-safe [9308]

$
0
0
LocExtension.ResolveLocalizedValue method throws "An element with the same key already exists" if called from multiple threads simultaneously.
↧

New Post: "key: " in designer

$
0
0
Hy @all

Are there any news?
I have the same issue on VS2012 Pro

Is there any Workaround?
Maybe a Batchfile?

Thanks in advance
Sascha
↧

Commented Issue: Possible Bug in Resource Buffering [9306]

$
0
0
Hi,

I think that I have the same issue. I have multiple independent modules with its own resx files (eg. one english and one swedish) and it has worked great defining the default assembly in the Xaml views until now. What happens is that I have the same resource key name in two separate resx files for two separate dlls. If I load the view in the on assembly it looks ok and shows the correct resource but when i load the second module it uses the resource from the first dll even though ive specified the correct default assembly in both.

Does it merge all already loaded resources with the new resource and only add missing keys? Is it possible to unload old resources prior to loading new?

//Christian
Comments: I ran into the same problem where I set the defaults in the XAML so that I only have to supply the key. The caching mechanism does not currently use the fully qualified key. See my pull request for the permanent fix: https://github.com/SeriousM/WPFLocalizationExtension/pull/22 Otherwise, a workaround is to always specify the fully qualified key (Assembly:Dictionary:Key)
↧

New Post: switching DesignCulture doesn't seem to work

$
0
0
I've added wpflocalizeextension via NuGet and followed the instructions in the Documentation section. My window looks like this:
<Window x:Class="WpfApplication12.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:lex="http://wpflocalizeextension.codeplex.com"
        lex:LocalizeDictionary.DesignCulture="en"
        lex:ResxLocalizationProvider.DefaultAssembly="WpfApplication12"
        lex:ResxLocalizationProvider.DefaultDictionary="Resources"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Button Content="{lex:Loc Key=String1}" />
    </Grid>
</Window>
In my Resources.resx file, String1=english
In my Resources.fr.resx file, String=french

I know things are working because in the designer, the button correctly displays "english". When I change lex:LocalizeDictionary.DesignCulture from "en" to "fr", the designer still shows "english" and I expect it to display "french".

A VS 2012 solution demonstrating this can be found here: https://dl.dropboxusercontent.com/u/4220513/WpfApplication12.zip

Can someone point out what I've done wrong?
↧
↧

New Post: Localization in style

$
0
0
ResourceDictionary is not derived from DependencyObject. You can solve this problem, by finding a suitable object in the final visual tree (after the resource is embedded), that is derived from DependencyObject and attaching these two properties to it.
↧

New Post: Enum localization

$
0
0
It is available in the LocalizeDictionary class that is in fact called in ResolveLocalizedValue like this:

LocalizeDictionary.Instance.GetLocalizedObject(resourceKey, target, targetCulture)

The key and targetCulture are clear how to be used and the target is the target object (or null in your case). Note, that this goes with the drawback, that no (custom) converter is called and no buffering is used. I'll therefore add a static method that fits your needs.
↧

Created Unassigned: Static ResolveLocalizedValue [9309]

$
0
0
It is available in the LocalizeDictionary class that is in fact called in ResolveLocalizedValue like this:

LocalizeDictionary.Instance.GetLocalizedObject(resourceKey, target, targetCulture)

The key and targetCulture are clear how to be used and the target is the target object (or null in your case). Note, that this goes with the drawback, that no (custom) converter is called and no buffering is used. I'll therefore add a static method that fits your needs.
↧
Viewing all 286 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>