Find out if resource localized for given culture
-
Hi all, How would I find out if a resource is localized for a given culture? E.g.: For
ResourceManager.GetString(String, CultureInfo)
"if the resource is not localized for this culture, the lookup will fall back using the current thread'sParent
property, stopping after looking in the neutral culture." (From MSDN) But I don't want it to fall-back or look in neutral cultures, is there a way I could get a value returned if the resource is simply not localized? :confused: -
Hi all, How would I find out if a resource is localized for a given culture? E.g.: For
ResourceManager.GetString(String, CultureInfo)
"if the resource is not localized for this culture, the lookup will fall back using the current thread'sParent
property, stopping after looking in the neutral culture." (From MSDN) But I don't want it to fall-back or look in neutral cultures, is there a way I could get a value returned if the resource is simply not localized? :confused:What would you expect to be returned if the value hasn't been localized? I'm confused as to your requirements here.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
What would you expect to be returned if the value hasn't been localized? I'm confused as to your requirements here.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
null
or an empty string, perhaps? I need to know that resource is not localized. I don't want to get an alternative from another language returned.Well, when you test it, don't have a fallback resource available. That should do it - basically, only have your localized version in place.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
Well, when you test it, don't have a fallback resource available. That should do it - basically, only have your localized version in place.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.