My project requires me to have a multilingual feature, so using Global.resx
I have a list of English terms and in Global.fr.resx
I have a list of French terms. This works perfectly. I can call in the term I require by using @Resources.Global. Whatever.
However, I now need to display these terms dynamically from the RESX file in a foreach
, from values gathered from the entity framework. Any idea?
Bit more info:
The code is very simple, I'm still learning C#, I'm working in the View, so literally I have @Resources.Global.Whatever to display static terms and then I have a foreach loop:
<ul>
@foreach (var category in Model.categories)
{ <li>@category.categoryName</li> }
</ul>
Where I want @category.categoryName to be called from @Resource.Global too.