slug translation implemented, needs review

Any suggestions on how to improve qTranslate? Post here!

Re: slug translation implemented, needs review

Postby Grozak » Tue Mar 23, 2010 5:42 pm

Hi and thanks for the plugin !

I made a little change in order to add a translation feature (based on post_title).
It's quite simple, just add these lines after "$remove = array();" (l. 745) :

Code: Select all
$title = qtrans_split($_POST["post_title"]);
   
  foreach($title as $key=>$value) {   
   if(empty($_POST["qts_".$key."_slug"])) {
      $_POST["qts_".$key."_slug"] = $value;
   } 
  }



Hope it will help ;)
Grozak
 
Posts: 1
Joined: Tue Mar 23, 2010 5:39 pm

Re: slug translation implemented, needs review

Postby pffmihai » Tue Mar 30, 2010 12:11 pm

Hi Guys,

Does this work with the currently latest wp version? I have 2.9.2 And it doesnt seem to work neither for pages nor posts.

When i enter the custom permalinks into the fields and update the page/post in editor. After saving & reloading the fields are blank .
pffmihai
 
Posts: 5
Joined: Tue Mar 30, 2010 10:38 am

Re: slug translation implemented, needs review

Postby digitaldonkey » Thu Apr 01, 2010 8:33 am

Same Issue :?:
digitaldonkey
 
Posts: 6
Joined: Mon Feb 22, 2010 12:54 pm

Re: slug translation implemented, needs review

Postby digitaldonkey » Thu Apr 01, 2010 10:31 am

There was an problem in the Plugin setup routine.

Replaced add_action( 'somestrangedir/filename.php', 'qTranslateSlug_install') with

Code: Select all
register_activation_hook( __FILE__  , 'qTranslateSlug_install');


Hope that helps you too

:D
Attachments
qtranslate-slug.php.txt
(26.66 KiB) Downloaded 212 times
digitaldonkey
 
Posts: 6
Joined: Mon Feb 22, 2010 12:54 pm

Re: slug translation implemented, needs review

Postby pffmihai » Thu Apr 01, 2010 11:05 pm

still doesn't save the slugs.. :|

Am i doing something wrong?

Mihai
pffmihai
 
Posts: 5
Joined: Tue Mar 30, 2010 10:38 am

Re: slug translation implemented, needs review

Postby pffmihai » Thu Apr 01, 2010 11:29 pm

I'm using wp 2.9.2 and latest qtranslate.

I just can't get this for slugs to work and really need it.. Anyone got it to work?
pffmihai
 
Posts: 5
Joined: Tue Mar 30, 2010 10:38 am

Re: slug translation implemented, needs review

Postby pffmihai » Sun Apr 04, 2010 4:26 pm

digitaldonkey wrote:There was an problem in the Plugin setup routine.

Replaced add_action( 'somestrangedir/filename.php', 'qTranslateSlug_install') with

Code: Select all
register_activation_hook( __FILE__  , 'qTranslateSlug_install');


Hope that helps you too

:D

hey digitaldonkey,

Does this plugin translates the slugs too for you?

I'm in desperate need to make this work as soon as possible.

Mihai
pffmihai
 
Posts: 5
Joined: Tue Mar 30, 2010 10:38 am

Re: slug translation implemented, needs review

Postby sularome » Mon Apr 12, 2010 6:44 am

@ pffmihai

Maybe this will help you:

when i installed the plugin, first it created table with name: qtranslate_slug
since i use prefix for the wordpress tables "wp_" i had to rename the database to "wp_qtranslate_slug" and then it worked fine.
Also, it was a bit confusing with the urls for me:
if you put slug:
Bulgarian : "slugBG"
English : "slugEN"

then your url should be:
Bulgarian : http://yoursite.com/bg/slugBG/
English : http://yoursite.com/en/slugEN/

If you have setup the qtranslate to parse different languages with "/language/" in the url ofc.

Hope this helps.
Yordan
sularome
 
Posts: 4
Joined: Tue Apr 06, 2010 8:07 am

Re: slug translation implemented, needs review

Postby karine » Tue Jun 01, 2010 7:26 pm

Hi ! First of all, thank you very much for this !!

It's working perfectly for me on my website :)

I have installed Wordpress 3.0 RC-1 and Qtranslate latest plugin + your plugin. Maybe this will help others so this is how I did it:

1) Install Qtranslate and edit Wordpress supported version like this :
Code: Select all
define('QT_SUPPORTED_WP_VERSION', '3.0-RC1');


2) Install Qtranslate slug, activate, and go to phpmyadmin to change qtranslate_slug database name to wp_qtranslate_slug (if your table prefix is wp_)

3) Now it should save the other languages slugs ! :)
- Thank you for the plugin!
DarineKo.com
karine
 
Posts: 17
Joined: Tue Jun 01, 2010 7:20 pm
Location: Paris

Re: slug translation implemented, needs review

Postby sprutniks » Tue Jun 01, 2010 8:08 pm

Hello, I'm running qTranslate with this slug patch on Wordpress 2.9.2, tables have been renamed.
I can save translated slugs, all of them are correctly displayed and working with posts, but when dealing with pages the links send to 404, as if unable to manage input permalink's %postname%.
For every other page without slug translation, qTranslate default URL modification works as expected.
Any suggestion is welcome!!
sprutniks
 
Posts: 12
Joined: Mon Apr 26, 2010 9:36 pm

PreviousNext

Return to qTranslate Suggestions Forum

Who is online

Users browsing this forum: No registered users and 3 guests