using System;
using System.Globalization;
using System.Resources;
using System.Diagnostics;
using System.Reflection;
namespace Routrek.SSHC{
/// <summary>
/// StringResource TvB
/// </summary>
internal class StringResources {
private string _resourceName;
private ResourceManager _resMan;
public StringResources(string name, Assembly asm) {
_resourceName = name;
LoadResourceManager(name, asm);
}
public string GetString(string id) {
return _resMan.GetString(id); //xNXLbV
}
private void LoadResourceManager(string name, Assembly asm) {
//pE{
CultureInfo ci = System.Threading.Thread.CurrentThread.CurrentUICulture;
if(ci.Name.StartsWith("ja"))
_resMan = new ResourceManager(name+"_ja", asm);
else
_resMan = new ResourceManager(name, asm);
}
}
}
|