wordpress use gettext library for translating pages content - wordpress

Im using wordpress to build a multilanguage website.I know exist many multilanguage plugins for this purpose.But I don't want to do in this way.There's any work around? could I use gettext library instead of plugins to translate pages content?
thanks
Luca

Short answer - NO
Slightly more long: gettext shows previously prepared translation (if exist) of piece of text, stored in mo-files. For user-generated content you just haven't this translation and methods of getting strings for translation
Note: all above is true, if multilanguage website for you means site with multilanguage content (and changeable from language to language), not just with different languages of interface

Related

How do I translate an article into different languages and save each translation as a separate page?

I have recently started working with WordPress.
I want to solve the following problem.
Using WordPress, I write an article in one language and save it.
I'm looking for a plugin or some solution so that I can write an article in one language once and translate it into 20+ different languages.
Before that, I used the Polylang plugin, but this plugin needs to be manually added for each language.
I need the plugin to do this work for me

How do I translate WordPress and WooCommerce?

I've got a WordPress website with WooCommerce. I need to translate it to another language than English, and, the problem is - most of texts are translated automatically in my language, but, for some reason few of them are still in English language.
For testing purposes, I had downloaded both WooCommerce translation files from another (working) site and nothing changed - only if I change whole theme, site is all in proper language.
What could be important - I'm editing theme by using a child theme.
Where can I find the solution? Maybe I should "force" the translation - but how? I know that theme is messing with that, but I can't change it for another...
Easiest thing you can do is use a plugin like Loco Translate. The theme might be missing translations or worse, directly written thus not allowing you to translate. If you feel up for it, try Poedit

Symfony change website's language

I am building a website using Symfony. I am wondering how can I change the language of my website by pressing a button.
Say I have two links in the footer (English and German) and when I click any of them, the whole website and all future views I access will remember my choice of language.
There are numerous websites who have this facility and I am wondering how can I achieve this goal.
Thank you!
Recommend checking out the jms/i18n-routing-bundle. You can use buttons or links to change the locale (language) and once changed the site will remain on that language. Just a bit of advice, use the "prefix" strategy when you set it up so that your site's urls will always be domain.com/language/.....
You'll have to learn how to use the translation bundle and setup translation files as well as having to learn how to setup Twig for translations, using the translation in your services and forms, but once you get the hang of it, it is really easy but time consuming.

WP plugin Polylang "copy" articles to all languages by default

I'm trying to figure out if there is a way how to set up Polylang (or some other translation plugin for WordPress) so that when I write an article or a page in one language (the default one) it will just make an exact copy of it and set it for the other languages. So the article/page is at least visible until I get my translator guy to translate it. Also he doesn't have to copy or write the article again and he just translates which is much more convenient.
Also, I'm struggling a bit with the translation of media. I know that I can turn it off, but I it would be awesome if I could use the same image and just add different translations to it, instead of uploading the same image for each language and just changing the description.
Thank you for your time :)

Drupal: Translating the Contact-Form

I want to use the default Drupal contact form for my website, but the labels("Your Name","Category") are in english an I need them in german.
Maybe I'm blind but i couldn't find a way to edit these labels.
So I googled it and found this Module: https://www.drupal.org/node/1396984
I installed the module and followed the guide, but it seems that I can only localize the categories or the auto-reply, because I still see english lables.
Am I doing something wrong, or is there just no easy way to change those lables?
thanks
I'm using the latest Version of Drupal 7.
You need to install the i18n module - https://www.drupal.org/project/i18n (if you haven't already). Then you can translate those strings ("Your name","Category") from the translate interface located at http://yoursite.com/admin/config/regional/translate/translate *
Note: If the strings don't appear in the translate interface try displaying the page containing them (the contact page) in a language other than the default one. This will register them for translation.
* replace yoursite.com with the address of the site you are developing
P.S. If you are going to make a multilingual site, I suggest you enable all relevant i18n submodules and import the drupal core translation for the languages you need from https://localize.drupal.org/translate/downloads
I believe what you need is the Localization client.
https://www.drupal.org/project/l10n_client

Resources