-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Translation Import for single records #344
Comments
I had a somewhat similar need in the past. What I did was to use External Import as an API (as described here: https://docs.typo3.org/p/cobweb/external_import/7.2/en-us/Developer/Api/Index.html#developer-api-import), in effect calling itself. This could be within a user function or within a custom step, depending on your needs. It could also be in the DatamapPostprocess event (https://docs.typo3.org/p/cobweb/external_import/7.2/en-us/Developer/Events/Index.html#developer-events-datamap-postprocess), since you would have the list of all records imported in the original language. |
Thank you. What I can retrieve via the API are all available translations for all records (including closed ones), which is significantly more than I initially imported. A single API call for all translations would likely be faster than 1,000 individual calls, despite the result containing significantly more records. |
It is definitely faster to retrieve all translations in one go. It's just a question of knowing where to store them until you use each of them. For this, a custom step would be the right place, because the "data" object provides an "ExtraData" array for storing whatever you need, and the data object is passed along to each step. And IIRC if you register a custom step after the StoreDataStep, it should have a list of all records that were handled so far. i.e. the list of records in the original language. If you want to create translations only for newly imported records, then you need to use the insert record preprocess event indeed. |
Thank you, I'll take a look at which approach is best suited for me. |
I have the following requirements:
I have imported datasets (svconnector_json). However, the translations for these datasets require an API call (JSON), where the ID of each individual record is needed.
So for the import of translations, I have to execute this call "individually" for each record.
How can this be solved?
Thank you for your help.
The text was updated successfully, but these errors were encountered: