Search Results for

    Show / Hide Table of Contents

    Analyzing the Files

    This chapter explains how to implement the file analysis functionality. The analyze files task operates on the SDLXliff files previously copied to the target folder. For projects with multiple target languages, run the analyze files task separately for each target language.

    Implement another helper function called RunFileAnalysis, which takes a FileBasedProject object as parameter as well as the target language locale as string parameter:

    • C#
    /// <summary>
    /// Runs the actual analyze files task on the SDLXliff target documents.
    /// </summary> 
    private void RunFileAnalysis(FileBasedProject project, string trgLocale)
    

    First, retrieve the target files by applying the GetTargetLanguageFiles method to the project, which takes the appropriate target Language object as parameter:

    • C#
    ProjectFile[] targetFiles = project.GetTargetLanguageFiles(new Language(CultureInfo.GetCultureInfo(trgLocale)));
    

    In the next step, we perform the actual analysis task by applying RunAutomaticTask to the project, which takes the file ids and the automatic task id (i.e. AnalyzeFiles) as parameters:

    • C#
    AutomaticTask analyzeTask = project.RunAutomaticTask(
        targetFiles.GetIds(),
        AutomaticTaskTemplateIds.AnalyzeFiles);
    

    See Also

    Configuring the Analyze Task Settings

    Analyze Files Settings

    • Improve this Doc
    In this article
    Back to top Generated by DocFX