How change language to pt-br in Swagger-UI using Swashbuckle?
I'm add in SwaggerConfig:
.EnableSwaggerUi(c =>
{
c.InjectJavaScript(Assembly.GetExecutingAssembly(), "{appnamespace}.Content.js.translator.js", false);
c.InjectJavaScript(Assembly.GetExecutingAssembly(), "{appnamespace}.Content.js.pt.js", false);
});
It works to me according to the documentation, in ASP.NET Core, for example, you must add the path in InjectOnCompleteJavaScript method.
The custom.js is my customized file obtained by swagger UI em production according to the path of the swagger UI in your application. My file is custom because I've executed
window.SwaggerTranslator.translate()
after learn method has been executed.