diff options
author | Rob Mensching <rob@firegiant.com> | 2017-12-31 00:43:02 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2017-12-31 00:43:02 -0800 |
commit | 84d1f05fee656c01938613bcc50bd8139006bbf6 (patch) | |
tree | 09397d0a8c952fbefe4298a1547087136e1828be /src/WixToolset.Core/Localizer.cs | |
parent | c5190ae74ab8fe13609362efce88fa4b8cc24f34 (diff) | |
download | wix-84d1f05fee656c01938613bcc50bd8139006bbf6.tar.gz wix-84d1f05fee656c01938613bcc50bd8139006bbf6.tar.bz2 wix-84d1f05fee656c01938613bcc50bd8139006bbf6.zip |
Support preprocessing .wxl files
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); |