I suggest you ...

Provide an example using the MAT in the shared section of a Universal App

Rather than duplicating the resource and XLF files for a Universal App, place them in the shared section and provide a sample of how to do it.

117 votes
Sign in
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Password icon
Signed in as (Sign out)
  • Dan Ricker commented  ·   ·  Flag as inappropriate

    Ok... Rebuilt from scratch a sample project ensuring the shared projects were referenced in the Main project. New changes were picked up. I'll sift through the project/solution files in my "real" work and make them match the current success for MAT references.

    As a side note, because I'm a disbeliever in general, I documented the details of each step for the above verification... The disbeliever in me wanted proof:-) I have that document if you want to add an edited version to the Knowledge base or Q&A for MAT.

    Thank you for responding.

  • AdminCameron Lerum (Sr. Software Engineer, Microsoft) commented  ·   ·  Flag as inappropriate


    I am not seeing this issue on my local machine running v4.0 Update 1. However, based on your comments, I believe the issue is related to a shared project not being associated with a UWP project.

    Please ensure the shared projects are added via references->Add References->Shared Projects to the Windows 10 Universal app. If the shared project is not referenced, MAT will not be enabled on that project as it will not find the project's source culture. Once the shared project is referenced by the Windows 10 Universal app, it will successfully enable and the workflow will work as expected.

    BTW: Adding the <DefaultLanguage> and MAT specific attributes manually to the shared project will fake MAT into allowing target languages to added. However, since shared projects are only built via the inclusion into the main project and since MAT updates the XLF and resource files during the build step, you will not received and XLF and resource updates.

    Please let me know if this solves the issue you are seeing,

    Thank you,

  • Dan Ricker commented  ·   ·  Flag as inappropriate

    Update on state of MAT V 4.0.1605.0.

    The only way I have been able to update the xlf files with new resw changes is to delete the existing xlf files. Arg...

    Again.. a "Manual" refresh would help a lot here. Having to delete the existing xlf is painful and will cause pain on later updates if I have to delete then manually merge to preserver previous changes.

  • Dan Ricker commented  ·   ·  Flag as inappropriate

    Update on state of MAT V 4.0.1605.0
    1) The "Things I've done to get MAT working in a VS2015 Universal 10 Solution: " post I made still applies. The *.shproj and *.projitems files need to be manually edit as described to enable MAT.

    2) Mat Successfully detects resw changes in the "main" project.
    3) FAILURE: Mat does not detect resw changes in shared projects.

    I have not found a way to manual force MAT to refresh, manually compare xlf state with source resw state.

    Adding this capability (force a manual update) would allow me to more easily move forward.

  • Dan Ricker commented  ·   ·  Flag as inappropriate

    Things I've done to get MAT working in a VS2015 Universal 10 Solution:
    -- Environment: Win10, VS2015, Universal 10 (UAP Version 10.0.10586.0)
    -- Solution Projects:
    Main - Application
    Shared1 - Shared Project 1 - Contains UI components
    Shared2 - Shared Project 2 - Contains UI components

    -- Manual Changes:

    1) Shared1.shproj and Shared2.shproj: Add default language xml tag in Globals Property Group:

    <PropertyGroup Label="Globals">

    2) Shared1.projitems and Shared2.projitems: Added MultilingualAppToolkit Property Group that I copied from Main.csproj file

    <PropertyGroup Label="MultilingualAppToolkit">


    I was able to add languages and translate them once. After the first time, the updated to the en-US resw file are not picked up by MAT.

    As a last resort, I'm considering removing all MAT generated content and start new using the updated en-US resw file

  • Adam Krantz commented  ·   ·  Flag as inappropriate

    Is there any more information available for how use MAT 4.0 with a UWP project with a shared project?

  • Anonymous commented  ·   ·  Flag as inappropriate

    Yep, exact same problem here, installed the plugin.
    All menu items grayed out. UWP with VS 2015

  • Mark WH commented  ·   ·  Flag as inappropriate

    I see the exact same behavior as Kevin. The menu item is grayed out for Universal Apps, but enabled for Portable class libraries and full windows apps. I am running VS2015 Professional.

  • Kevin Tran commented  ·   ·  Flag as inappropriate

    I tried to enable Multilingual App Toolkit for my Universal Windows project, but the menu item (under Tools) is grayed out. This is Visual Studio 2015 Community edition. However, the menu item is available in Windows 8 projects. Does anyone have the issue?

  • AdminCameron Lerum (Sr. Software Engineer, Microsoft) commented  ·   ·  Flag as inappropriate


    I was able to extract the string using the code-behind approach, which is what I believe what you are trying to accomplish.

    There are a couple of items to check.
    1. I am not familiar with GetResourceValue(). I used
    var resourceLoader = new Windows.ApplicationModel.Resources.ResourceLoader();
    String locText = resourceLoader.GetString("LocString/Text");
    2. If you trying to extract a resource with a property name, the property name's period needs to be replaced with a forward slash. So the RESW ID "LocString.Text" becomes "LocString/Text" in the code-behind. Note: If no match is found, a empty string will be returned.
    3. Be sure that you have applied a translation to the resource in the XLF file. If the XLF file does not contain a translation (state = 'new'), no matching entry is added to the target RESW file (fr-Fr/Resources.resw in my example). When this is the case, you will get the language fallback value.

    Hope this helps,

  • Anonymous commented  ·   ·  Flag as inappropriate

    I tried MAT with windows 10.A resw file is generating but i cant see access of localized strings in GetResourceValue(string key) function.

  • Filippo Bottonelli commented  ·   ·  Flag as inappropriate

    I give a bump to this topic again. I hope for something to come out even though it's not definitive. Just some directives, since at the moment I'm stuck with my whole project. Thank you

Feedback and Knowledge Base