webForumDet fria alternativet

resx läsa.

.NET

1 svar · 225 visningar · startad av jazzil

Medlem sedan maj 2003151 inlägg
Frågan#1

Tjena, jag har lite problem att läsa resx filer.

public string GetLanguageString(string LangString, string File)
{
ResourceManager rm = new ResourceManager("tournamentMaker." + File, this.GetType().Assembly);
return rm.GetString(LangString);
}

// Jag skickar med:
Language Lang = new Language();
Response.Write(Lang.GetLanguageString("topbar_text", "language.sv.resx"));

Får meddelnadet:
Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly.
Make sure "tournamentMaker.resources" was correctly embedded or linked into assembly "tournamentMaker".
baseName: tournamentMaker locationInfo: <null> resource file name: tournamentMaker.resources assembly:
tournamentMaker, Version=1.0.1708.26450, Culture=neutral, PublicKeyToken=null

Filen och inehåller som jag söker finns i det aktuella namespacet

Medlem sedan maj 2003151 inlägg
#2

Ingen som har en aning ... för jag har inte.

268 ms totalt · 4 externa anrop · v20260731065814-full.e96017d9
123 ms — deklarationer (db)
0 ms — hämta statistik (cache)
135 ms — hämta tråd, inlägg och bilagor (db)
129 ms — ändringar (db)