Closed neoecos closed 9 years ago
It's possible with some work in the plugin. But I have no time for that now.
A quick&dirty solution would be to: -buidl your restapidoc.json file with the plugin -create your own i18n files, -to parse the restapidoc.json file, get a copy for each i18n -for each i18n files, replace key with their corresponding value in json -write all these json files
Then you can create a controller method: def lang = params.lang File docFile = new File(params.lang+"_"+grailsApplication.mergedConfig.grails.plugins.restapidoc.outputFileReading ) // ENG_restapidoc.json, FR_restapidoc.json,... render(docFile.text)
The render must be done on restapidoc/grails-app/views/restApiDoc/index.gsp
You could call "/mycontroller/myaction?lang=ENG, ...
Thank you for the answers.
It's a really cool idea.
Hi, i was just wondering if there is any way to add i18n to this plugin?
Thank you,