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.

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by Marcel 9 months ago.

Assisted by: Marcel.

Author Posts
September 13, 2023 at 9:36 pm #14392697

jeremyV-5

Whenever you translate a Player Metric its translation will be also displayed in the original language. The translation of the Metric is visible from the original language both in the frontend and backend. Meaning the error is visible and affects both administrators and users.

You can reproduce this issue on any installation with Sportspress and WPML. It is independent of plugins or themes.

Another thing I came across is issues with the transportation of individual player statistics from one language to another. When I set all relevant Sportspress Post Types to ‘Translatable’ and all relevant Sportspress Custom Fields to ‘Copy’ the general features of Sportspress work as expected. But individual player statistics seem to be tricky. Heres what I mean:

I put in a complete Baseball game including the Boxscore. The Game result is automatically transported from one language to the other. Sportspress Calendars and League Tables update. But a individual Player Profile in the translation language will not have updated individual statistics taken from the game. This is because when I translate a Game it does not connect the Players Data in the boxscore from the original language player profile to the translated player profile. Also the translation of the game does not link the opposing teams specified in sp_team – the translated game will exist without teams linked to it.

It basically means I have to put in the complete Gamedata again for every translation because WPML does not transport it sufficiently.

Am I doing something wrong or do we have an issue here?

I am trying to: Transport all individual player statistics of a Game to another language through said Game

I expected to see: Everything to look like the original language.

Instead, I got: No individual stats showing up in the player profiles, opposing teams loosing their links to the game, a lot of work unfortunately.

Some information to clarify: There is something that causes translated player profiles to loose the link to its assigned current team and translated games to loose its link to the opposing teams.

Original Language —— Translation
Team A Original —— Team A Translation
Team B Original —— Team B Translation

Player Original —— Player Translation
current Team A original —— current Team ??? (expected: Team A Translation)

Game Original —— Game Translation
Team A Original vs Team B Original —— ??? vs ???

Also a player list that collects players from a specified team will loose this this filter in the translation.

Current Team of a player, participating Teams of a game, and filter from team of a player list is lost in translation. All relevant fields set to ‘copy’.

September 15, 2023 at 9:28 am #14402061

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

please note that SportPress is not certified yet to use with WPML. From what I can see, we had it listed back in 2014, but the author never worked on issues, so it was removed from our compatibility list.

There are known issues with it and the "Certified compatibility with WPML" mentioned on https://wordpress.org/plugins/sportspress/ is not verified by us: https://wpml.org/plugin/?wpv_view_count=120064&wpv-plugin-functionality=0&wpv_post_search=sportspress&wpv-wpcf-recommendation-flag=&wpv_filter_submit=Search.

I recommend informing the authors and inviting them to apply here to get their product certified: https://wpml.org/documentation/support/go-global-program/. Our devs will be happy to help them to adjust their code.

Best Regards
Marcel

September 15, 2023 at 3:16 pm #14404151

jeremyV-5

I m surprise of the response because I can read that on their website:
hidden link

image.png
September 18, 2023 at 6:29 am #14409203

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

as I mentioned, this is not confirmed by us. You can find all our certified plugins on the list above. You should contact the authors and invite them to apply for certification to get it tested. It seems they tested it the last time themselves in 2016.

Best Regards
Marcel

September 21, 2023 at 12:34 pm #14439009

jeremyV-5

I'm still trying to figure out how to be able to translate our website with WPML or with an another translation service.
The last response of Sportpress was this one:
Hi Jeremy

Thanks for your reply.

In short, this is due to how WPML works, I'm not sure if there is a way to automate it.

WPML creates new items for each language. So if you have two languages you actually have twice as may players, games, competitions, calendars and so on. Then it hides the items that aren't from the language that is being used.

The box score needs to load players by their ID, but WPML would need to get the player from the original event, find the translation for it, and then add it as referenced data in the same format we use for the original box score.

I could be wrong, but as far as I know this isn't possible. The WPML is the best one to tell you if it is really possible or not.

Thanks!

September 21, 2023 at 2:25 pm #14440415

jeremyV-5

Is this a support service or paid service available to help me with this?

September 21, 2023 at 2:26 pm #14440417

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

the authors need to add compatibility in their codebase. We are happy to help them to guide them in the correct direction via our (above-mentioned) Go-Global program. Still, it's their reasonability to adjust their code based on our APIs to make it translatable.

If they follow best practices for WordPress development, many parts will be work out of the box (translation of Custom Post Types, Taxonomies, Custom Files etc.)

Regarding your example:

Whenever you translate a Player Metric its translation will be also displayed in the original language. 

We are technically creating another entry as a translation and link it to your default language. If you open the Frontend on your default language, it will only load IDs from the database related to that language. If you open from a secondary language, it will load the ID of the translated equivalent, as our API will check the active language. We do not "hide" anything. This is not how WPML works and would not make sense, as you would have twice the load on your DB to perform those queries.

The authors need to adjust their calls to only load the specific language. This is doable using filters and hooks from our Coding API or adding further checks when calling functions.

Let me show you a real example regarding SportsPress: We created a workaround here https://wpml.org/forums/topic/404-error-on-frontpage/#post-9455313 that the plugin doesn't show a 404 error when WPML is active. This fix needs to go into the codebase of SportsPress, as this is out of our control. Our devs are happy to help them get it checked to integrate compatibility, but this only works with cooperation from the authors.

I recommend you forward this to the authors, who claim compatibility on their website. Hopefully, my example will give them a better overview of WPML compatibility.

EDIT as our messages crossed time:
If you want a paid service, all our certified WPML developers from our list here https://wpml.org/contractors/ can help you further.

Best Regards
Marcel

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.