Question: I've this application structure:

```
AppName
    Resources
        Languages
            en.xaml
            it.xaml

```

I'm trying to load a specific `ResourceDictionary` based on the `CurrentCulture` of the software that I set when the application start, a little example:

```
var dict = new ResourceDictionary();
string currentLang = "it-IT";

if (currentLang == "it-IT")
{
    CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("it");
    Application.LoadComponent(dict, new Uri("..\\Resources\\Languages\\it.xaml", UriKind.Relative));
}
else
{
    CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("en");
    Application.LoadComponent(dict, new Uri("..\\Resources\\Languages\\en.xaml", UriKind.Relative));
}

```

when the code reach this line: `Application.LoadComponent(dict, new Uri("..\\Resources\\Languages\\it.xaml", UriKind.Relative));`

I get this error:

> 
> System.Exception: 'A resource identified by the URI' ..\Resources\Languages\it.xaml 'is not available for the' System.Windows.ResourceDictionary 'component.'
> 
> 
> 

why happen this?

Thanks for any explaination.

Answer: 
Try it like this. I am doing like this and it finds them.

```
Application.LoadComponent(dict, new Uri("pack:\\application:,,,\YourDLL;\\component\\Resources\\Languages\\en.xaml", UriKind.Relative));

```
This should work: 

```
string currentLang = "it-IT";

if (currentLang == "it-IT")
{
    CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("it");
    MainWindow.AppWindow.lsVm.GetCurrentLangDict=(ResourceDictionary)Application.LoadComponent(new Uri("..\\Resources\\Languages\\it.xaml", UriKind.Relative));
}
else
{
    CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("en");
    MainWindow.AppWindow.lsVm.GetCurrentLangDict=(ResourceDictionary)Application.LoadComponent(new Uri("..\\Resources\\Languages\\en.xaml", UriKind.Relative));
}

```