I need to localize all the strings and Enums in FormFlow for the German language. How can I use RView tool to generate resource files? I have read following but I couldn't understand how to use it. Can someone explain in simple steps
https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-formflow-localize
I think that it's pretty clear, but let's try to write some steps:
- In your code, look for the static method that builds the form, for example this one in the ContosoFlowers example.
- Once you found it, then capture two things: the namespace and the assembly name. In the context of the ContosoFlowers sample the namespace it will be
ContosoFlowers.Models
and the assemblyContosoFlowers.dll
(it's on the bin folder after you build the project). - Run the
rview
tool asrview -g {AssemblyName} {Namespace}.{NameOfTheBuildFormMethod}.
Following the ContosoFlowers sample it will berview -g ContosoFlowers.dll ContosoFlowers.Models.BuildOrderForm
- Folllow the steps described in the Configure your project section of the doumentation to add the resulting
resx
file to your solution.
Note: The RView tool is included with the BotBuilder SDK nuget package. Once you add the NuGet to your project if you go to packages folder and then to the Microsoft.Bot.Builder folder, you will find a tools folder with the
RView.exe
file. Alternatively, you can get the source code of the tool at https://github.com/Microsoft/BotBuilder/tree/master/CSharp/Tools/RViewNote 2: If you make changes and want to recreate the resx file, do not forget to change the Neutral Language (back) to '(None)', or else the rview tool will give you an error message (Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Resources.MissingManifestResourceException: Missing resources System.Collections.Generic.List`1[System.String] ...)
来源:https://stackoverflow.com/questions/46199439/how-to-use-rview-tool-in-bot-builder-c-sdk-to-localize-strings-in-form-flow