eloquent-driver
eloquent-driver copied to clipboard
Taxonomies doesn't support multi sites ( multi language )
Creating a taxonomy that support both language doesn't work.
the dashboard enables for both language ( but one of them which is not the origin doesn't save if title filed was supporting multi lang )
I'm not a big multi-site user so its not entirely clear to me that the issue is? Are you saying that in your example there should also be a term for arabic
alongside the terms for default
?
I'm not a big multi-site user so its not entirely clear to me that the issue is? Are you saying that in your example there should also be a term for
arabic
alongside the terms fordefault
?
yes either having an origin column like "entries" or like "Globals" where it's being saved in the localization column (JSON), check image for reference
But some how much of modules support the multi-site expect the taxonomies
It does save localisations, you can see that here: https://github.com/statamic/eloquent-driver/blob/f5fdc8175e057b3290b1fc792b0a3b56437e3aa7/src/Taxonomies/Term.php#L25-L29
But I think the issue is with line 68 here: https://github.com/statamic/eloquent-driver/blob/f5fdc8175e057b3290b1fc792b0a3b56437e3aa7/src/Taxonomies/Term.php#L67-L71
It should be assigning to $data['localizations'][$locale]
- do you want to try changing that on your side to see if it helps?
As you can see i have added $data['localizations'][$locale]
but still
then i dump before line: 68 $source->dataForLocale($locale)->toArray()
as you see in the screenshot even i have sent an Arabic text still the array being dumped is having the english text
Hope that's clear
The english text is stored as a locale, so if youre doing a dump and exit it may be the first one being output. Is anything being stored under the localizations
key in the data column?

Still when i add this $data['localizations'][$locale] = $source->dataForLocale($locale)->toArray();
as u see the record in db has no localization key
I can confirm, that when you try and create a translation for a term, the translation is not saved - this fix in https://github.com/statamic/eloquent-driver/issues/78#issuecomment-1285034671 doesn't work. I'll look into this as well as we need it working in our new project.