public void CreateTemplate(TranslationProviderServer tmServer)
        {
            #region "TemplateProps"
            ServerBasedLanguageResourcesTemplate template = new ServerBasedLanguageResourcesTemplate(tmServer);
            template.Name        = "Sample Language Resources Template";
            template.Description = "Language Resources template created through API";
            #endregion

            #region "variables"
            LanguageResourceBundle variables = new LanguageResourceBundle(CultureInfo.GetCultureInfo("en-US"));
            variables.Variables.Add("SDL Trados Studio 2009");
            variables.Variables.Add("SDL MultiTerm 2009");
            #endregion

            #region "abbreviations"
            LanguageResourceBundle abbreviations = new LanguageResourceBundle(CultureInfo.GetCultureInfo("en-US"));
            abbreviations.Abbreviations.Add("hr.");
            abbreviations.Abbreviations.Add("cont.");
            #endregion

            #region "AddResources"
            template.LanguageResourceBundles.Add(variables);
            template.LanguageResourceBundles.Add(abbreviations);
            #endregion

            #region "save"
            template.Save();
            MessageBox.Show("Unsaved changes? " + template.IsDirty.ToString());
            #endregion

            #region "delete"
            template.Delete();
            #endregion
        }
        public void DeleteLanguageTemplate()
        {
            ServerBasedLanguageResourcesTemplate template =
                TMServer.GetLanguageResourcesTemplate(ParentOrganizationPath + "/APISampleTemplate", LanguageResourcesTemplateProperties.None);

            if (template != null)
            {
                template.Delete();
                WriteResult("Template deleted\r\n");
            }
        }