I want to use multilanguage structure in my ASP.NET MVC project. I have only two languages. So I keep two string fields in my DB for two languages (Eg: Header_EN and Header_TR).
I get my current language value from my .resx file dynamically (Eg: EN or TR). But I have to use a dynamic model in my view. Normally I'm using this for single language:
@model MyProject.Models.tTextTable
<div class="TextDetailContainer">
@Html.Raw(Model.MyTextDetail_EN)
</div>
And I want to use a dynamic model value for multilanguage something like that:
@model MyProject.Models.tTextTable
<div class="TextDetailContainer">
@Html.Raw(Model.("MyTextDetail_" + Resources.Language.CurrentLanguage))
</div>
Is there a possible way to do this with this logic or is there another way to create dynamic model in Razor?