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.

Our next available supporter will start replying to tickets in about 2.45 hours from now. Thank you for your understanding.

This topic contains 1 reply, has 2 voices.

Last updated by Marcin 3 years, 8 months ago.

Assigned support staff: Dat Hoang.

Author Posts
December 21, 2015 at 11:36 am #773594

helpstring

I am trying to: translate languages in the switcher to Russian (Englisch->Английский)

URL of (my) website where problem appears:
hidden link

I expected to see:
Английский instead of ?????????? in the translation of the language.
Instead, I got:
??????????

This works fine on another site with the same font type. I hope you can help me here. 🙂

December 22, 2015 at 7:20 am #774385

Marcin

Dear Andreas

If you eliminate a font problem and you are sure, that used font has Cyrillic characters, then we must check database setting. This is known problem and is about database character set and collation. In this issue you have "to weak" database endcoding to properly save and show characters like this "У меня проблемы с признаками" you should have characterset set at lease "utf8" but better to use is "utf8mb4" and collation "utf8_general_ci" but better "utf8mb4_unicode_ci".

But first, please check your database version, and you can do that in two ways:

1. Add php file which this code:

<?php
phpinfo();

and run this file in browser, then check mysql version.

2. Install and activate Adminer plugin https://wordpress.org/plugins/adminer/ and go to WordPress Admin -> Tools -> Adminer, click button "Start Adminer Inside", click "SQL Query" and enter inside:

select version();

If version of your MySQL is lesser then 5.5.3 then this server do not handle 'utf8mb4' characterset, and please use 'utf8' instead 'utf8mb4' and 'utf8_unicode_ci' instead 'utf8mb4_unicode_ci'.

To check default charset and collation use this code:

SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME
FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'wordpress';

To check columns charset and collation use this code:

SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, C.CHARACTER_SET_NAME FROM information_schema.TABLES AS T
JOIN information_schema.COLUMNS AS C USING (TABLE_SCHEMA, TABLE_NAME)
JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY AS CCSA ON (T.TABLE_COLLATION = CCSA.COLLATION_NAME)
WHERE TABLE_SCHEMA=SCHEMA() AND C.DATA_TYPE IN ('enum', 'varchar', 'char', 'text', 'mediumtext', 'longtext')
ORDER BY TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME;

More about character set and WPML you can find here: https://wpml.org/faq-tags/charset/

Backup your database first before you proceed! You can use a plugin for this if you like. I often use the Duplicator plugin for this purpose. See: http://wordpress.org/plugins/duplicator/

If you do not have those setting, then you can change this by this SQL:

ALTER DATABASE databasename CHARACTER SET utf8mb4COLLATE utf8mb4_unicode_ci;
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Regards,
Marcin