Wondering if there is a way to use transcribe add on for expression engine in another add on.
So ideally I would want to use the command that I would use in a template {exp:transcribe:replace name="variable"} in a library page of a custom add on that I developed.
The reason is I am building a single page app that gets all of it's content from ajax calls. So the page will call an add on I built that does the api call and returns the content in json format. Ideally I would make the translation in that add on so it is already translated once the json is returned to the page. From there Handlebars is building the page with the json object.
I am hoping there is a fairly straight forward way of doing this as I am fairly new to expression engine.
My alternative plan is to make a call and grab all variables for a given language and create an object or array out of it and then cycle through it when I need to translate something. This is not ideally how I would want to do it though as it feels like a hack.