Skip to content
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

When I use I18N, how should I use Slugify #63

Closed
NidMo opened this issue Jun 4, 2022 · 5 comments
Closed

When I use I18N, how should I use Slugify #63

NidMo opened this issue Jun 4, 2022 · 5 comments

Comments

@NidMo
Copy link

NidMo commented Jun 4, 2022

I have content type.

image

The slug filed must be unique.But in different language environments, some words are spelled the same.

For example, the spelling of English marketing is the same as that of German marketing. In this case, the slug should be the same, but the rules restrict that the slug can only be a unique value

@NidMo
Copy link
Author

NidMo commented Jun 4, 2022

Slugification
Any time the respective content types have an entity created or updated the slug field defined in the settings will be auto generated based on the provided reference field.

When I input some Thai and Japanese text content, the automatically generated slug is empty. And the slugs I actively input will be overwritten by the automatically generated rules

@ComfortablyCoding
Copy link
Contributor

Their is no unique restriction in place for slugs at this time. Two records can have the same slug.

In regards to the different language coming up empty I will need to look into this.

@NidMo
Copy link
Author

NidMo commented Jun 8, 2022

Can I use a button to control whether to automatically generate a slug

@ComfortablyCoding
Copy link
Contributor

ComfortablyCoding commented Jun 8, 2022

At the moment no, it's not possible to disable the slugification for a specific record on save due to how the plugin is built.

It can potentially be added once custom fields are released but we will need to wait and see how those will operate.

I do plan on doing a revamp of the plugin and adding new features. I will keep this in mind.

@ComfortablyCoding
Copy link
Contributor

ComfortablyCoding commented Oct 25, 2022

I am closing this as it seems to me that ths is not something the plugin can handle by itself. I would suggest 2 possible solutions to anyone else having this issue

  1. Use an additional reference to make it unique per record and per internationalization (id and/or locale should ensure this)
  2. Use a text field over the uid field for the slug to get around the unique constraint.

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

No branches or pull requests

2 participants