0

For the application I'm working on, I have resource files for mask data for the English and Japanese language. I need to run tests based on the current culture. I can successfully switch which resource file by setting the CurrentUICulture for the current thread. However, due to how the requirements are phrased, whether a given value is translated varies, so I can't just set the culture and then just retrieve values. So, if the customer is using a particular encoding in their web browser, I use that language for the name and text of all of the guides. If they're using a device from a given region, I translate the video names into that language instead. It's weird, but it's how the requirements are written.

I understand that if I have a ResourceManager, I can use GetString to pull the value for a particular culture, but all of the examples I've found involve dynamically pulling in a text file of the resources. Instead, I have all of the resources embedded in the project. Is there a way to set up a ResourceManager for an embedded set of resources? Or is there a better way to conditionally pull the correct translation for any given situation?

Community
  • 1
  • 1
Sean Duggan
  • 1,105
  • 2
  • 18
  • 48

1 Answers1

0

I found my answer here. I just need to use ResourceNamespace.ResourceName.ResourceManager to fetch the RM for the resx file.

Community
  • 1
  • 1
Sean Duggan
  • 1,105
  • 2
  • 18
  • 48