Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem: No themes are listed and .mo file are not found.String table appears to be empty

Solution:
-Back up the site and DB before making any changes
- First, deactivate all your WPML plugins.
- Then go to : wp-content/plugins/sitepress-multilingual-cms/sitepress.php:17 on line 17 and change this line:

define( 'ICL_SITEPRESS_VERSION', '3.6.3' ); 

by this one:

define('ICL_SITEPRESS_DEV_VERSION', '3.2.3');
define( 'ICL_SITEPRESS_VERSION', '3.2.3' );

- Then reactivate your WPML main plugin, then the string translation.
- Deactivate the plugins again and return the previous changes for ICL_SITEPRESS_VERSION to be 3.3.8 as the original one.
- Then go to WPML -> Theme nd plugin localization and select " Translate the theme and plugins using WPML's String Translation"
- Then scan your theme and plugins.

Relevant Documentation:

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 georgiaT 4 years, 8 months ago.

Assigned support staff: Bobby.

Author Posts
March 28, 2017 at 12:09 pm #1241312

georgiaT

I am trying to: translate theme using WPML and .mo files

My primary language is Greek and secondary English.

URL of (my) website where problem appears:

I expected to see:

1 - Themes installed to be listed on Language on "Strings in the theme " section
2 - .mo files to be found on "locale settings" section
3 - "String translation" table theme values

Instead, I got:

1 - .mo files are "not found" on "locale settings" section
2 - No themes are being listed on "Strings in the theme "
3 - "String translation" table appears to be empty, only option as domain in dropdown menu is "WordPress"

Steps to duplicate the issue:

no-strings-shown.jpg
no-mo-files-found-and-no-themes-are-listed.jpg
March 29, 2017 at 2:33 am #1241891

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

Thank you for contacting WPML Support,

1. Please go ahead and click on "scan the theme for strings "

2. You have set your locale to invicta-el.mo what happens once you change it to el.mo ?

3. Have you placed the invicta-el.mo within wp-content/languages ?

March 29, 2017 at 8:32 am #1242052

georgiaT

Hi,

3) I had placed .mo files in .../language/themes folder, I moved them to "language" folder and now "File exists", so this works fine now!

2) "language" folder already has el.mo files as i have translate wordpress to Greek language, should I change from invicta-el.mo to el.mo?

1) I scanded again theme files, the scan finished successfully,

"WPML found 1195 strings. They were added to the string translation table.
More details Done scanning files"

however string translation table is still empty. This may has to do with domain selection. Please see attachments.

string-translation.jpg
language-of-domains.jpg
March 29, 2017 at 4:39 pm #1242602

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

2) "language" folder already has el.mo files as i have translate wordpress to Greek language, should I change from invicta-el.mo to el.mo?

==> It is up to personal preference, as long as you have now moved invicta-el.mo to the right location as you stated in your #1 then it should be ok.

Regading the strings not showing

Please go to WPML => Support , and click on "Troubleshooting" while in the Troubleshooting page please perform the actions. (specifically "set language information" but i recommend performing all of them"

Let me know if can now see the string in String Translation

March 31, 2017 at 12:11 pm #1244303

georgiaT

Hi,

I went on WPML => Support => Troubleshooting

I perform all actions in clean up section, however nothing changed in string translation table.

Is it something I should do with "language of domains"?

string-translation.jpg
troubleshooting.jpg
March 31, 2017 at 5:47 pm #1244654

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

I dont think that its the domain , unless you have done something to change it ?

Your theme is compatible with WPML.

**Before we proceed I recommend to please take FULL BACKUP of your database and your website.**
I often use the Duplicator plugin for this purpose See: http://wordpress.org/plugins/duplicator/

I would like to request temporary access (wp-admin and FTP) to your site to fix the issue.
(preferably to a test site where the problem has been replicated if possible)

You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you will enter is private which means only you and I can see and have access to it.

Thank you,
Bobby

April 3, 2017 at 6:35 pm #1246177

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

After doing some debug I found that you are missing some database columns, most probably you are missing some updates, so to resolve these :

- First, deactivate all your WPML plugins.
- Then go to : wp-content/plugins/sitepress-multilingual-cms/sitepress.php:17 on line 17 and change this line:

define( 'ICL_SITEPRESS_VERSION', '3.6.3' ); 

by this one:

define('ICL_SITEPRESS_DEV_VERSION', '3.2.3');
define( 'ICL_SITEPRESS_VERSION', '3.2.3' );

- Then reactivate your WPML main plugin, then the string translation.
- Deactivate the plugins again and return the previous changes for ICL_SITEPRESS_VERSION to be 3.3.8 as the original one.
- Then go to WPML -> Theme nd plugin localization and select " Translate the theme and plugins using WPML's String Translation"
- Then scan your theme and plugins.

I have test this on my local enviroment where i duplicated your site and i was succesfully able to see the strings in string translation.

Please try this on your live site and let me know your results
Best Regards.

April 4, 2017 at 10:40 am #1246699

georgiaT

steps revision:

1. Deactivate all WPML plugins
2. open wp-content/plugins/sitepress-multilingual-cms/sitepress.php

change line 17: define( 'ICL_SITEPRESS_VERSION', '3.6.3' );
to
define('ICL_SITEPRESS_DEV_VERSION', '3.2.3');
define( 'ICL_SITEPRESS_VERSION', '3.2.3' );

3. Activate
a) WPML main plugin
b) then the string translation
c) then the rest

4. Deactivate WPML plugins again

5. open wp-content/plugins/sitepress-multilingual-cms/sitepress.php :

remove : define('ICL_SITEPRESS_DEV_VERSION', '3.2.3');
change : define( 'ICL_SITEPRESS_VERSION', '3.2.3' );
to : define( 'ICL_SITEPRESS_VERSION', '3.3.8' );

and NOT to : define( 'ICL_SITEPRESS_VERSION', '3.6.3' );

6. Activate
a) WPML main plugin
b) then the string translation
c) then the rest

7. Go to WPML -> Theme and plugin localization and select " Translate the theme and plugins using WPML's String Translation"

8. Scan your theme and plugins

Please confirm the steps.
Could these changes affect somehow the translated pages/post?

April 4, 2017 at 5:36 pm #1247138

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

Could these changes affect somehow the translated pages/post?

-> These steps should not affect your existing posts/pages , still i do always recommend a backup.

You mentioned above

: define( 'ICL_SITEPRESS_VERSION', '3.3.8' );

and NOT to : define( 'ICL_SITEPRESS_VERSION', '3.6.3' );

Is your current version 3.3.8 on your live site? Then thats ok.

April 6, 2017 at 8:39 am #1248583

georgiaT

Hi,

The issue has been solved!

Thank you very much for your help!