Localised SlugField not working

How to autogenerate localised Slugs?
This (slugField) works for the default slugfield but does not add a slug in the localised fields… both fields title and slug are set to localised.

How can I check, address and add the localised fields in the bootstrap.php?

Thanks in Advance!

I successfully created it using locales; here’s how to do it:

  1. First, create a bootstrap.php file inside config/bootstrap.php using the code from @faridbouchdak with the GitHub link here.
  2. Create a localization at https://url-cockpit/system/locales for the language you want. For example, I created English as shown in this image:
  3. Go to the model you have created or will create, add all the fields you want, and don’t forget to enable Localize field in the settings. For example, I created a field of type text with the name title and another field of type text with the name slug. Both fields must have the Localize field enabled.
  4. Go to the settings for your slug and configure the slug. In my case, I wanted to create the slug based on the title, so I went to options → JSON and configured it like this:

The slug will be created once you fill in the default title, the localized title, and save the data.

Hope this helps :smiley: