It is my first effort with localization and the more I read about it the more confused I become. To be honest, I am just looking for an answer at this point. So here is the error I am getting:
Unhandled Exception:System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "MeetnGreetSf.Resources.AppResources.resources" was correctly embedded or linked into assembly "MeetnGreetSf" at compile time, or that all the satellite assemblies required are loadable and fully signed. occurred
And here is the class:
public class TranslateHelper
{
readonly CultureInfo ci;
private string ResourceId = "MeetnGreetSf.Resources.AppResources";
private ResourceManager resmgr;
private CultureInfo cui = new CultureInfo("es-ES");
public TranslateHelper()
{
//ResourceId += "." + cui.Name;
resmgr = new ResourceManager(ResourceId, typeof(AppResource).GetTypeInfo().Assembly);
}
public string Translate(string Name)
{
var translation = resmgr.GetString(Name, ci);
return translation;
}
}
I think I am close for some reason it is appending .resources to the file instead of .resx?
Thanks in advance for any help.
Forgot to include how the translate class is being used.
public Colors()
{
colorInfo = new ObservableCollection<ColorType>();
t = new TranslateHelper();
this.GenerateColors();
}
private void GenerateColors()
{
colorInfo.Add(new ColorType(t.Translate("Aqua"), Color.Aqua));
colorInfo.Add(new ColorType(t.Translate("Black"), Color.Black));
colorInfo.Add(new ColorType(t.Translate("Blue"), Color.Blue));
colorInfo.Add(new ColorType(t.Translate("Gray"), Color.Gray));
colorInfo.Add(new ColorType(t.Translate("Green"), Color.Green));
colorInfo.Add(new ColorType(t.Translate("Lime"), Color.Lime));
colorInfo.Add(new ColorType(t.Translate("Maroon"), Color.Maroon));
colorInfo.Add(new ColorType(t.Translate("Navy"), Color.Navy));
colorInfo.Add(new ColorType(t.Translate("Olive"), Color.Olive));
colorInfo.Add(new ColorType(t.Translate("Purple"), Color.Purple));
colorInfo.Add(new ColorType(t.Translate("Red"), Color.Red));
colorInfo.Add(new ColorType(t.Translate("Silver"), Color.Silver));
colorInfo.Add(new ColorType(t.Translate("Teal"), Color.Teal));
colorInfo.Add(new ColorType(t.Translate("White"), Color.White));
colorInfo.Add(new ColorType(t.Translate("Yellow"), Color.Yellow));
}
}