MVCアプリケーションをローカライズしたいのですが、メソッドを使用したいのですが、ここでw(message)
「flem」が答えたので、次のコードがあります。
namespace System.Web.WebPages
{
public static class Localization
{
public static string w(this WebPageBase page, string message)
{
return message;
}
}
}
しかし、かみそりのページ(page.cshtml
)では使用できません@w("hi")
が、@this.w("hi")
機能します。どのように機能する可能性があるか知りたいのですthis.method()
が、method()
機能しませんか?