Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 9 replies, has 2 voices.

Last updated by Andreas Neuber 6 years, 4 months ago.

Assigned support staff: Andreas Neuber.

Author Posts
May 15, 2014 at 9:21 pm #401339

mohammedT

Dear All,

I have English and Arabic languages installed on my sites
The WordPress installation language is English
Now the default language is Arabic
With the latest version of WP & WPML
Now I have these questions:

1) I have 59 posts in Arabic language can I duplicate them all together to the English language?

2) When the post is published I want it to be available (automatically duplicated) in all languages this is a very pressing issue please how can I do that?
3)In the wp-admin when I go to WPML -> Language -> Blog posts to display and select all posts and change the default language to English and all my posts in Arabic were gone from the blog posts page is that normal? I want the posts to be available even if I change the default language how can I do that?

4) In the wp-admin when I go to WPML -> String translation I get a broken screen like the picture number “1” in the attached pictures I think that was because the Arabic language is RTL although I selected the English language from the top admin bar! Please how can I solve that? This problem also appear if I go to WPML -> Taxonomy Translation but the difference here is that all WordPress languages change to Arabic language! Like picture number “2” in the attached pictures.

5)I want to overwrite some default WordPress strings like “Register For This Site” that appears when the user want to register, before now when I was used qTranslate I overwrote these strings by putting en_US.po & en_US.mo in the wp-content/languages and that worked fine but now that is not working, how can I do that?

6) I use Theme My Login plugin and when the user wants to login in Arabic language the login page appears with the two links to the English Register and Lost Password pages! as you can see in picture number “3” in the attached photos also after the user logged-in in Arabic language the nav-menu have “Log Out” in English not “تسجيل الخروج” in Arabic Like picture number “4” in the attached photos both “Log Out” and “تسجيل الخروج” refer to log out pages in both languages how can I fix that please?

Thank you for your patience in reading and answering this topic I really appreciate that.

Best regards,

May 16, 2014 at 6:54 am #401460

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Hello Mohammed,

I will try to answer all your questions one after the other.
(in case this thread becomes too long I recommend to open that we open then a "fresh one")

1) Yes, this is possible - via "Batch duplication in the Translation Dashboard"
You find more details here http://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-using-content-duplication/ --> 2nd sub heading

2) For this you need some custom code which uses our API function "icl_makes_duplicates"

function wpml_duplicate_on_publish ($post_id) {
	if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
		return;
	}
	icl_makes_duplicates($post_id);
}
add_action('wp_insert_post', 'wpml_duplicate_on_publish', 10, 1);

The code should go into the "functions.php" of your active theme.
If it doesn't work, what I don't hope, please let me know.

3) You are right the expected behavior here is that also see your Arabic posts.
In case this still happens, could you try "WPML > Support > Troubleshooting Page > Button "Set Language Information"?
Does the problem continue?

May 16, 2014 at 9:46 am #401600

mohammedT

Hello Andreas,

Thank you for your help

The problem of the first question is solved.

For the second question I put the code in functions.php of my active child theme but it didn't work.

Also for the third question my last post duplicated nearly 450 times for the same language after I clicked on Set Language Information button!!! is that because of the code in question two?

May 16, 2014 at 10:38 am #401638

mohammedT

Now guess what I cant delete any post when I want to trash any post I get this message "Error in moving to Trash." how can I solve that?

May 16, 2014 at 11:11 am #401670

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Hello Mohammed,

Sorry to hear that!
Is the code of point 2. still active? If so, could you comment it out?

# If the problem with "Error in moving to Trash." still persists..
Would you mind providing us with credentials for your website and we have a closer look at the settings? For this purpose you should see a protected webform all they way down here in this thread. (it asks first for "Backup + Legal disclaimer")
Thanks in advance!

May 16, 2014 at 6:52 pm #402034

mohammedT

Hello Andreas,

Sorry about delay because I am very sick.

I talking with bluehost support because I think it was a server problem because I got too many DB error when I trying to delete the posts and comment the code. So I don't know now if the problem was caused by the host or the code or because Set Language Information button.

Now I can delete the posts but I still want to automatically duplicate the posts and what is about other questions can you help me with it?

May 19, 2014 at 1:48 am #402509

mohammedT

Hello Andreas,

Where are you?

What can I do now?

May 19, 2014 at 5:30 am #402538

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Hello Mohammed,

Sorry for the delay! Glad to hear that you were able to delete the posts now.
Did you get my additional email I send you last Friday?

Issue 2)
Meanwhile our developers found some things in the core plugin code which need to be corrected - otherwise our API method "icl_makes_duplicates" doesn't work correctly.
These changes are part of the next version 3.2. If you want to I can add them for you.

Issue 3)
Would you mind providing us with credentials for your website and we have a closer look at the settings? For this purpose you should see a protected webform all they way down here in this thread. (it asks first for "Backup + Legal disclaimer")
Thanks in advance!

May 19, 2014 at 3:30 pm #403132

mohammedT

Hello Andreas,

Thank you very much for helping me now I deleted the site because I get to many problems(I think it was because the migration from qTranslate to WPML) I'll reinstall WP and I'll tell you if I get any problem.

May 20, 2014 at 5:22 am #403340

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Hello Mohammed,

Sorry to hear that! But I'm positive that eventually we will get things working
I would recommend..
a) create next to the live also a "test"/"staging"site and tests for duplication can be done there
b) As also mentioned here under "Support Policy", feel free to post one extra topic per problem - absolutely no problem, and we will help us to address things better