-
-
Notifications
You must be signed in to change notification settings - Fork 782
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
how to prevent auto translation for my arabic tags #304
Comments
The problem you describe is because the tag name and slug are not saved for the tags, the slug is simply used to show the tags everywhere (including the url). To create the slug we use a dependency that does those conversions: limax. We have come up with some ideas to solve it but we still do not have a definitive solution to the problem. Maybe if we add a new optional Content Collection so that in cases like yours you can define the name of the tag and slug, we will tell you later what we can think of or if you have any suggestions please let us know. For now we will give you the two lines that are associated with it: |
@prototypa thanks for the fast response, I am waiting for the solution!! |
@prototypa can you read this issue where they solve it but i don't know what should i change now in my astrowind theme! |
@prototypa Is there any update for this problem! i have built the website and host it but just can't solve this problem! and it prevents me from building the other website with this cool theme! |
@prototypa here is my solution export const cleanSlug = (text = '') => {
const regex = /[^\d\u0621-\u064A]+/g;
return trimSlash(text)
.split('/')
.map((slug, index, array) => {
// Preserve slashes in the middle, but replace in the beginning and end
if (index !== 0 && index !== array.length - 1) {
return slug;
}
// If the slug starts with "-", consider it as a tag and preserve it
if (slug.startsWith('-')) {
return slug;
}
// Otherwise, replace unwanted characters
return slug.replace(regex, '-');
})
.join('/');
}; I don't know if it the right way to solve it but i works! |
Sorry for the delay. Another thing you can do is go to this line: Line 64 in 155a602
and instead of using |
I have configured an astrowind template for my blog but when i write an Arabic article the tag go from "الدمام" into aldmam!
who to solve this problem!
The text was updated successfully, but these errors were encountered: