public Add ( |
||
symbolicId | ||
locale | string | |
text | string | |
return | void |
public void Add(XmlQualifiedName symbolicId, string locale, string text)
{
lock (m_lock)
{
if (symbolicId != null)
{
string key = symbolicId.ToString();
Add(key, locale, text);
if (m_symbolicIdMapping == null)
{
m_symbolicIdMapping = new Dictionary<XmlQualifiedName, TranslationInfo>();
}
if (String.IsNullOrEmpty(locale) || locale == "en-US")
{
m_symbolicIdMapping[symbolicId] = new TranslationInfo(key, locale, text);
}
}
}
}
/// <summary> /// Creates the resource manager for the server. /// </summary> protected override ResourceManager CreateResourceManager(IServerInternal server, ApplicationConfiguration configuration) { ResourceManager resourceManager = new ResourceManager(server, configuration); // add some localized strings to the resource manager to demonstrate that localization occurs. resourceManager.Add("InvalidPassword", "de-DE", "Das Passwort ist nicht gültig für Konto '{0}'."); resourceManager.Add("InvalidPassword", "es-ES", "La contraseña no es válida para la cuenta de '{0}'."); resourceManager.Add("UnexpectedUserTokenError", "fr-FR", "Une erreur inattendue s'est produite lors de la validation utilisateur."); resourceManager.Add("UnexpectedUserTokenError", "de-DE", "Ein unerwarteter Fehler ist aufgetreten während des Anwenders."); return resourceManager; }