Plugin Author
Thomas
(@tsteur)
@shaodan1997 it should automatically use the same language as configured for your user in your WordPress Admin. What language is used in the WordPress Admin when you log in?
Thread Starter
戚威生
(@shaodan1997)
My WordPress Admin is set to zh_CN.
Ans to be precise, the setting page of Matomo Analytics in WordPress Admin follows the language configuration, while the reporting page can only display in English.
I have tried to switch my language configuration to Japanese(which is alos supported in the demo) in WordPress Admin, and the behavior is the same. Setting page of Matomo Analytics in WordPress Admin displays in Japanese but reporting page displays in English.
Plugin Author
Thomas
(@tsteur)
@shaodan1997 thanks for this.
Are you familiar with editing files in your WordPress? If so, could you try to add the lines of code as shown in https://github.com/matomo-org/wp-matomo/pull/345/files to the file wp-contnet/plugins/matomo/classes/WpMatomo/User/Sync.php or replace the entire file with the content of this URL: https://raw.githubusercontent.com/matomo-org/wp-matomo/52129cc1d3cf5edae65d65e4288964ce5be3860c/classes/WpMatomo/User/Sync.php
Then, once the file was updated, go to Matomo Analytics -> Diagnostics -> Troubleshooting -> Sync users in your WP Admin and check if the language is now shown correctly?
If you aren’t familiar with updating files let me know.
Thread Starter
戚威生
(@shaodan1997)
Hi,
Thanks for your patch, Thomas.
But I am afraid it doesn’t solve the problem. The reoprting still display in English.
And I notice that in Matomo Analytics -> Diagnostics -> System report -> Server, the value of Locale and User Locale is correct even with the original Sync.php.
Plugin Author
Thomas
(@tsteur)
@shaodan1997 sorry about that. I reproduced it now and found the problem. Adjusted this line to make it work: https://github.com/matomo-org/wp-matomo/pull/345/files#diff-3ec228aed8229a7c92536865c7cef670R172
The patch will also be included in the next release. Thanks for noticing this and creating this issue.
Thread Starter
戚威生
(@shaodan1997)
It works! Thanks for your help.