Translate website without duplicate custom post

I have a website where anyone can post jobs from frontend. The jobs pages are rendered by custom archive and single pages in my custom theme.

I want the website to be multi language with switcher. The problem is to translate the static text in archive-job.php and singe-job.php, without translating the content of jobs.

I tried polylang, but that one needs multiple posts, one for each language. Which means that I need to duplicate the post content

Is there a way to assign multiple languages to same post, without creating redundant posts in polylang (or a free alternative, excepting WPML)?

Topic plugin-polylang translation plugin-development custom-post-types Wordpress

Category Web


You could create one post with each language variation wrapped in a custom tag. You would need to create a parser then to extract the language you require but it would avoid creating redundant posts like you wished.

For example the post content would be:

<eb>This is my post<en><de>Das ist mein Beitrag<de>

I currently use WPML and would highly reccomend it!

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.