diff options
Diffstat (limited to 'src/WixToolset.Core/Localizer.cs')
-rw-r--r-- | src/WixToolset.Core/Localizer.cs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/WixToolset.Core/Localizer.cs b/src/WixToolset.Core/Localizer.cs index 38d8864e..cb9a4406 100644 --- a/src/WixToolset.Core/Localizer.cs +++ b/src/WixToolset.Core/Localizer.cs | |||
@@ -22,13 +22,22 @@ namespace WixToolset.Core | |||
22 | /// <summary> | 22 | /// <summary> |
23 | /// Loads a localization file from a path on disk. | 23 | /// Loads a localization file from a path on disk. |
24 | /// </summary> | 24 | /// </summary> |
25 | /// <param name="path">Path to library file saved on disk.</param> | 25 | /// <param name="path">Path to localization file saved on disk.</param> |
26 | /// <param name="tableDefinitions">Collection containing TableDefinitions to use when loading the localization file.</param> | ||
27 | /// <param name="suppressSchema">Suppress xml schema validation while loading.</param> | ||
28 | /// <returns>Returns the loaded localization file.</returns> | 26 | /// <returns>Returns the loaded localization file.</returns> |
29 | public static Localization ParseLocalizationFile(IMessaging messaging, string path) | 27 | public static Localization ParseLocalizationFile(IMessaging messaging, string path) |
30 | { | 28 | { |
31 | XElement root = XDocument.Load(path).Root; | 29 | var document = XDocument.Load(path); |
30 | return ParseLocalizationFile(messaging, document); | ||
31 | } | ||
32 | |||
33 | /// <summary> | ||
34 | /// Loads a localization file from memory. | ||
35 | /// </summary> | ||
36 | /// <param name="document">Document to parse as localization file.</param> | ||
37 | /// <returns>Returns the loaded localization file.</returns> | ||
38 | public static Localization ParseLocalizationFile(IMessaging messaging, XDocument document) | ||
39 | { | ||
40 | XElement root = document.Root; | ||
32 | Localization localization = null; | 41 | Localization localization = null; |
33 | 42 | ||
34 | SourceLineNumber sourceLineNumbers = SourceLineNumber.CreateFromXObject(root); | 43 | SourceLineNumber sourceLineNumbers = SourceLineNumber.CreateFromXObject(root); |