Comments (5)
Wow, that one caught me by surprise - how come I never even looked for that? :( I just happily went along with the earlier suggestion... Looks like it's working nicely though, I can't really think of anything that would break that wouldn't break in the other solution...
I couldn't find a similar option to force the duplicate URLSegment right on creation of a new translation though. Is there something else I've missed?
Martine
Martine
from silverstripe-languageprefix.
Hi Martine,
That's indeed something which doesnt work i see (when creating a translation)
Bart
from silverstripe-languageprefix.
I could hackishly fix this in an onBeforeWrite() but I feel this should really be a Translatable issue/enhancement...
from silverstripe-languageprefix.
I've changed the previewtest branch to use your solution, The LanguagePrefixTranslatable class is no longer necessary, so it is removed.
I've added a (temporary) LanguagePrefix::onBeforeWrite() to keep the original URLSegment intact if duplicate URLSegments are allowed and created a request to the Translatable module to allow for this feature.
Please could you test the 'previewtest' branch, before I merge it into master?
from silverstripe-languageprefix.
No further comments, so I'm going to merge this into master
from silverstripe-languageprefix.
Related Issues (17)
- Inserting Link with HTML Editor HOT 3
- after change Translatable::set_default_locale from EN to LT home page not found HOT 3
- 404 error if multibyte URL's are allowed. HOT 8
- How to hide the main language prefix HOT 1
- Prevent Translatable appending locale to a URL HOT 1
- release tagged versions HOT 6
- 404 on Homepage HOT 4
- Fatal error: Call to a member function getURLPrefix() on null in /var/www/html/languageprefix/code/LanguagePrefix.php on line 203 HOT 8
- enable_duplicate_urlsegments HOT 1
- SS4 Compatible Version HOT 1
- Silverstripe 4 Namespacing & Compatibility HOT 5
- cannot call action on homepage HOT 1
- Language prefix not used in CMS split view HOT 19
- Use default locale without language prefix HOT 42
- Multi-byte character strings immediately after language prefix cause a 404 HOT 3
- How to handle SS- built-in routes/controllers HOT 1
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 silverstripe-languageprefix.