Extensions
public static class StringExtensions
{
//Modify MultiLangResx.Resources.Resource to your [Namespace].[Resource
name]
public static String ToAutoMultiLang(this String source)
{
return MultiLangResx.Resources.Resource.ResourceManager.GetString(source);
}
}
|
How to use
@{ String submitMultiLang
= "Submit".ToAutoMultiLang();
}
<input type="submit" value="@submitMultiLang" />
|
or
<input type="submit" value="@Html.DisplayName( "Submit".ToAutoMultiLang())">
|
沒有留言:
張貼留言