How to get the translated slugs on the front-end #1401
Replies: 5 comments 2 replies
-
Just one more comment, because I may be messing around... I do know that activating "qTranslate Slugs" makes it work... But with some warnings. I'm already using PHP 7.4 insteaad of 8.1 or 8.2. On the admin:
On the front:
Sounds weird to me because my understanding is that "qTranslte Slugs" was ported into qTranslate-xt, instead of creating a bridge. Thanks again! |
Beta Was this translation helpful? Give feedback.
-
Migration should work with this sequence:
The above only migrates the legacy plugin options, if in your project there are calls to the legacy plugin functions, those need to be replaced manually, based on current slugs module source and your project intents.
|
Beta Was this translation helpful? Give feedback.
-
Hi @spleen1981 Thanks a lot for the update, it did work like a charm besides a couple of minor issues. I've seen that you are one of the module's developer. I believe it may be a good idea to add your instructions to the Slugs readme file. Should I do a pull request? |
Beta Was this translation helpful? Give feedback.
-
Thanks @spleen1981 I'm wondering if the order matters and it is only possible to migrate the slugs after activating the module. Otherwise the option doesn't show up in QTX Settings > Import/Export. I may be wrong, our site is quite dated... If it is true, and given that I never used the original plugin and I'm mostrly unfamiliar with it all, I would replace the actual "I've been using the QTS plugin, how can I find the existing slugs?" section with: How can I migrate from the legacy QTS plugin to the new module?If you are migrating from using qTranslate X and the qtranslate-slug (QTS) plugin, migration should work with this sequence:
If you are using functions from the legacy plugin in your theme files, you may want to switch to a neutral theme. Attention! Do not uninstall QTS before migrating data to qTranslate, it deletes data permanently. Once the migration is done, the data is not be visible in QTS anymore and the QTS plugin can be uninstalled. |
Beta Was this translation helpful? Give feedback.
-
Yes the slugs module must be activated to migrate, as relevant code is part of the module itself. Hence activation bullet come first, and migration later. |
Beta Was this translation helpful? Give feedback.
-
Hi!
I'm trying to update an old project that used qTranslate-X and qTranslate Slugs, but i'm getting lost...
Basically, there are many calls to the
qts_get_slug()
function, and I don't know how to replace it. My editor says thatget_slug()
is available and I fould it as a public function. But I'm not sure how to call it.It's mostly shown as
qts_get_slug($r->ID, $currentLang)
.I replaced the previous plugins with the new one, deactivated everything else related to the old plugin and migrated the slugs.
What am I missing? I'm sorry, I'm not a PHP dev.
Thanks a lot for your work!
Beta Was this translation helpful? Give feedback.
All reactions