Comments (5)
I have to say nay. I think this is too language specific, I guess it would complicate things too much for an edge case. This is tied really closely to the language used for the string, much more than the rest of the transliterations rules. In most systems there will be more than one languages used. At least every system which is in some other language than English will have English words and phrases.
For example, a German blog on music could have a title like Angus & Julia Stone haben ein neues Album veröffentlicht, which would become angus-und-julia-stone-haben-ein-neues-album-veroeffentlicht
, which is wrong because their band name should be transliterated to angus-and-julia-stone
. It gets even more complicated if the German title contains another ampersand, e.g. in "Angus & Julia Stone haben ein neues Album & Video veröffentlicht in which case the first & should become and and the second & should become und.
To be honest, I also don't want to maintain a list of translations, the transliterations are headache enough. Especially when I guess that there are probably languages with special cases with multiple words for and.
from slugify.
I guess the better approach would be to create a separate library with this as special purpose. You could than apply the ampersand translator and Slugify in sequence if you want to see this behaviour in your stem.
from slugify.
Very good points. 👍
Additional rules have to be taken into account. Italian is usually excellent for testing linguistic rules and exceptions.
Perhaps I'll look into creating such a library myself. 😄
from slugify.
If you do create a library drop me a line and I include a link in the readme, in case other users need something like this.
from slugify.
Sure thing.
from slugify.
Related Issues (20)
- Generated ruleset different from the json file HOT 1
- Symfony Bundle ignores ruleset HOT 1
- Problem with combining characters HOT 2
- There is any options to convert in Unicode symbols to description HOT 3
- User Deprecated HOT 5
- Issue with usage, example doesnt work after installing with composer HOT 3
- how to get slug without translation HOT 1
- Laravel 9 Support HOT 3
- Sign « changes on quot HOT 1
- Split DefaultRules into deparate files
- Add command-line interface to this package? HOT 1
- release for php 8.2 HOT 2
- Remove reserved characters like ­ and
- New release does not work on PHP 7.4 HOT 2
- The version 4.4.0 have been removed from Packagist? HOT 3
- Requirements Version 4.5 HOT 2
- version 4.5.0 is not compatible with PHP 7 although mentioned in packagist HOT 3
- Czech rules missing several characters
- Syntax error, unexpected '|', expecting variable {t_variable} HOT 3
- Issue with Php Composer (Slugify)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slugify.