Hy, I have the problem that I am programing a site for multi businesses. I use DisplayName and LabelFor. The site is similar for each business, only the LabelFor name changes. I found a lot of multi-language possibilities using resource files (resx) and culture. But I don’t want to use this because it’s not a culture “problem”. So the question is…
- Can I use resx files without using culture? Maybe control with some other global parameter
- Can I get the string from database using “Stringkey” and business “id” (eg: Search.Label.Firstname,
- Is there any other possibility/idea to do this?
Thx a lot Chris
Here are a couple of options:
LabelFor
) to pull your label from client-based resource files. Name each resource file after the business it applies. You could easily read some global state from an HTML helper. You also still have the option to localize the labels for each business.LabelFor
, make the label text part of your view model. You would then have many options where to retrieve it from.