private static string GetTranslatedString(HPMUniqueID projectId, EHPMProjectDefaultColumn column, uint iValue) { HPMUntranslatedString unTranslated = SessionManager.Session.UtilGetColumnDataItemFormatted(projectId, column, iValue); HPMLanguage language = SessionManager.Session.LocalizationGetDefaultLanguage(); String translated = SessionManager.Session.LocalizationTranslateString(language, unTranslated); return(translated); }
/// <summary> /// Gets a localized string from a Hansoft full translation ID. /// /// NOTE: Currently there is no way to select which translation to use but UK English will always be used. /// </summary> /// <param name="fullId">The full translation ID for the string to get.</param> /// <returns>The localized string.</returns> public static string GetLocalizedStringForFullId(string fullId) { uint translationId = SessionManager.Session.LocalizationGetTranslationIDFromFullTranslationID(fullId); HPMUntranslatedString untranslated = SessionManager.Session.LocalizationCreateUntranslatedStringFromTranslationID(translationId, null); HPMLanguage language = SessionManager.Session.LocalizationGetDefaultLanguage(); // This means that UK English always will be used return(SessionManager.Session.LocalizationTranslateString(language, untranslated)); }