ローカライズされた Web サイトがあり、LINQ を使用していくつかのプロシージャを呼び出しています。これらのプロシージャには、言語切り替え後に翻訳する必要があるテキストが含まれています。これは私のプロシージャコールの1つです:
public static IQueryable VyhledejCPN()
{
LINQDataContext db = new LINQDataContext();
IQueryable result = db.spSearchPartNumber(PartNumber).AsQueryable();
return result;
}
そして、私はこのようなものが必要です:
if (localize == english)
{
public static IQueryable VyhledejCPN()
{
LINQDataContext db = new LINQDataContext();
IQueryable resultEN = db.spSearchPartNumberEN(PartNumber).AsQueryable();
return resultEN;
}
}
else if (localize == czech)
{
public static IQueryable VyhledejCPN()
{
LINQDataContext db = new LINQDataContext();
IQueryable resultCZ = db.spSearchPartNumberCZ(PartNumber).AsQueryable();
return resultCZ;
}
}
それとも何か他の方法がありますか?
どうもありがとうございました。