Skip to content

Craft 4 - Allow usage of current CP language for alt text generation #12

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mathg
Copy link

@mathg mathg commented Dec 5, 2024

With the custom field that has been added to the project, I added couple changes on how to handle the language sent to the AltText.ai. Instead of using the language selected in the configuration, it uses the language set for the current site in the CP and it saves back the response in the proper asset language.

I also added a button directly inside the Asset Page instead of using the action in the asset list page.

I needed to adjust that for my current use of this plugin on a multilingual site. This is basically an idea of how to use the siteId that is already saved inside the DB table.

@dispositiontools
Copy link
Owner

thank you so much for this. I've been playing with this. and done an initial merge in to a test branch.

It's got me thinking, that in some use cases of sites its an obvious fit - ie each site has a different language, but on some sites all the sites might be in the same language, so resending the same image multiple times for the same language might be a fast way to use up credit..

So I'm playing around with site settings, but also with the idea of sending each request per language rather than for each siteId.

Thanks for your patience

@mathg
Copy link
Author

mathg commented Jan 28, 2025

@dispositiontools do you have any update on this? Did you manage to adapt this to allow multilingual?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants