Web-based Translator Implementation

I have created my own translator. So far, nothing new! The question is, is it possible to implement this translator by my applications' web-server, avoiding an automated distribution for everyone, making it available for every application user, only?
  • I'm not sure there is a simple mechanism for that but people with a deeper knowledge might know better.
    However: wouldn't it be easier for your web application to expose metadata in a generally recognized format such as COinS? There would be nothing more to distribute, and your application would be supported without a specific translator.
  • See https://www.zotero.org/support/dev/exposing_metadata. COinS may or may not be the correct choice depending on the kind of metadata you need to expose.
  • Aborel, AbeJellinek, thanks for your answers. That would be the desirable solution; the thing is I've been there (COins and others) and for some reason (maybe my fault!) I wasn't succeeding generating a multiple entry selector based on my applications' metadata. With that in mind I started visiting known sites that do offer that possibility and all of those were using custom translators, so I did the same thing.
  • edited 26 days ago
    translators use Zotero functions and you can't hook into Zotero function from your webapp (for obvious security reasons), so no to your question as asked, in case that wasn't clear.

    currently unAPI is the most robust such option in terms of Zotero import, though its online documentation is basically non-existent at this point as it has never really been used beyond Zotero.
  • Agreed, and unAPI does let you serve multiple items on a single page. (But support for multiples in generic translators is weak in general - this is something we're working on improving.)
  • adamsmith, I agree: "translators use Zotero functions and you can't hook into Zotero function from your webapp", but the connector would just as he does from a local installation.
    To be specific, my custom translator was 1st developed and installed locally by the desktop installation, together with the bunch coming with the distribution. It workes under that scenario.
    I would expect that placing it on the web-server and letting the connector know about it would work as well. At the same time, this sort of solution would mean less extra work for the zotero team (no revsions and maintenance of 3rd party loggic) and a target specific availability for the users of these web applications. Am I thinking right?
  • We just don't support that. As @adamsmith said, there are obvious security reasons not to allow websites to run arbitrary code within Zotero.

    If your application is publicly available, contribute the translator to the zotero/translators GitHub repo (open a PR), and all your users will get it automatically.

    If it's internal to an institution, consider asking users to copy it to their Zotero translators folder manually.

    But if you can get away with exposing metadata in a standard way like unAPI, you should do that.
  • @AbeJellinek thanks, I'll do that.
Sign In or Register to comment.