Created
December 12, 2014 15:01
-
-
Save cromica/1a94eb68741b1d21e67d to your computer and use it in GitHub Desktop.
Add Translation Memory to a project using Studio SDK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //create a translation provider entry and specify the path to the tm | |
| var entry = new TranslationProviderCascadeEntry(@"path to the tm", true, true, true); | |
| //get default project translation provider configuration | |
| var providerConfiguration = project.GetTranslationProviderConfiguration(); | |
| //override project default settings in order to allow us to specify tm's | |
| providerConfiguration.OverrideParent = true; | |
| //add the translation provider to the configuration | |
| providerConfiguration.Entries.Add(entry); | |
| //set tm for all language pairs | |
| project.UpdateTranslationProviderConfiguration(providerConfiguration); | |
| //if you want to add the tm per languague pair use the commented code instead of the above line | |
| //foreach (var item in project.GetProjectInfo().TargetLanguages) | |
| //{ | |
| // project.AddMasterTM(providerConfiguration, item.IsoAbbreviation); | |
| //} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment