I've recently transitioned into API developer writing at my job and would like to create an option to choose different program languages for our sample code. As of now, we only provide cURL code samples, but I would like to expand our options. I really like how Stripe API accomplishes this as they allow you to push a button for the language option which in turn updates the sample code. Postman also provides an option to changes the language of your sample code. I'm an extreme novice when it comes to this stuff, but after doing a little research, I believe that Stripe uses javascript to change the samples.
We're currently using Slate's static site generator of our page.
I figured that having the ability to change the speaking language of a site was similar to what I'm looking for and already found some useful information here in stack overflow. I know I can create the buttons and navbar, but it's the scripting on the back-end that I'll have some trouble with.
Hopefully someone can point me in the right direction to get started. Thank you in advance and I apologize if I wasn't clear enough as I'm totally new to all this.