Reputation: 11
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…
Thx a lot Chris
Upvotes: 0
Views: 123
Reputation: 56909
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.public class MyModel
{
public string NameLabel { get; set; }
public string Name { get; set; }
}
Upvotes: 1