VirtueMart Forum

VirtueMart 2 + 3 + 4 => Language/Translations => Topic started by: michelerighetti on November 11, 2021, 10:01:43 AM

Title: some constants are not translated on the bilingual site
Post by: michelerighetti on November 11, 2021, 10:01:43 AM
Hello. I am making a site in 2 languages Italian (main language) and English. I have set up the menus correctly. I have checked all the errors that I could have made by reading on this forum. Unfortunately it happens that the site in English is partially translated. Some things are translated and some are not.
For example in the category screen the product titles and short descriptions are not translated, if I view the single product it is translated.
In the single product there are custom fields with the constants set for the translation, some fields are translated, others are not.
I have set up a side menu with categories, but they are not translated.
I can't understand what's wrong.
I post some image

Title: Re: some constants are not translated on the bilingual site
Post by: GJC Web Design on November 11, 2021, 12:38:45 PM
have you correctly installed the VM lang files and translated the products?

for the custom fields u have to use lang constants and translate them in the Joomla lang over rides system
Title: Re: some constants are not translated on the bilingual site
Post by: michelerighetti on November 11, 2021, 14:38:42 PM
Quote from: GJC Web Design on November 11, 2021, 12:38:45 PM
have you correctly installed the VM lang files and translated the products?

for the custom fields u have to use lang constants and translate them in the Joomla lang over rides system

I have used Constants for translating Custom fields and I have translated the constants in both languages in the Joomla lang overrrides System.
About the Vm language pack, can you explain to me how to install correctly? I believe I have done the correct procedure.
however I only find thelang pack version for VM2 and not for VM3. it's right?
Title: Re: some constants are not translated on the bilingual site
Post by: GJC Web Design on November 11, 2021, 14:45:36 PM
yes.. the lang packs page has a wrong VM2 header

sorry .. out of ideas re the rest .. I have no problems with multi lingual sites..
have u tried as a test with SEF off ?
Title: Re: some constants are not translated on the bilingual site
Post by: michelerighetti on November 11, 2021, 14:47:55 PM
Yes, I did a test with sef disabled. Nothing changes.
Title: Re: some constants are not translated on the bilingual site
Post by: Jörgen on November 11, 2021, 14:54:01 PM
Turn on language debug in Joomla to see what it gives for clues.

Jörgen @ Kreativ Fotografi
Title: Re: some constants are not translated on the bilingual site
Post by: michelerighetti on November 11, 2021, 18:40:30 PM
Thank you for your answer. I turned on language debugging and it doesn't give me any useful clues.
Title: Re: some constants are not translated on the bilingual site
Post by: Jörgen on November 12, 2021, 09:20:11 AM
That screenshot ypu show is totally meaningless. You should see untranslated strings and notices in you rendered output. It is not a strict report tool. It displays clues everywhere in your output.

Jörgen
Title: Re: some constants are not translated on the bilingual site
Post by: jjk on November 13, 2021, 21:55:46 PM
Can you provide a link to that website? That would make it easier to see what might be wrong.
Title: Re: some constants are not translated on the bilingual site
Post by: Studio 42 on November 15, 2021, 10:28:20 AM
Do a screenshot with debug Language active please
Some issue can be because your template do not use Joomla Key system
Title: Re: some constants are not translated on the bilingual site
Post by: michelerighetti on November 16, 2021, 08:55:51 AM
Quote from: jjk on November 13, 2021, 21:55:46 PM
Can you provide a link to that website? That would make it easier to see what might be wrong.
the website is in maintenance mode at the moment.
Title: Re: some constants are not translated on the bilingual site
Post by: michelerighetti on November 16, 2021, 09:06:01 AM
Quote from: Studio 42 on November 15, 2021, 10:28:20 AM
Do a screenshot with debug Language active please
Some issue can be because your template do not use Joomla Key system

I don't understand i ?? in some fields. What is the meaning of those ??
What is the difference between ** and ??
Title: Re: some constants are not translated on the bilingual site
Post by: Jörgen on November 16, 2021, 09:54:31 AM
https://docs.joomla.org/Debugging_a_translation/en (https://docs.joomla.org/Debugging_a_translation/en)

Jörgen @ Kreativ Fotografi
Title: Re: some constants are not translated on the bilingual site
Post by: michelerighetti on November 16, 2021, 10:02:54 AM
Quote from: Jörgen on November 16, 2021, 09:54:31 AM
https://docs.joomla.org/Debugging_a_translation/en (https://docs.joomla.org/Debugging_a_translation/en)

Jörgen @ Kreativ Fotografi
Thanks Jörgen, I have read the page dedicated to the translation indicated by you. In the image I have highlighted 3 words which are taken from the same place but one is translated and the others are not. The debug says that the category title is translatable, but it does not find the translation, but the translation is there, in the side menu it says that it is not translatable and this puzzles me. I really don't understand where I'm wrong.
Title: Re: some constants are not translated on the bilingual site
Post by: Studio 42 on November 16, 2021, 10:25:14 AM
If only some are translatable, it's because  in some case you have the PHP code
echo Jtext::_($original_string);
and when not translatable only
echo $original_string;
As i explained before, this need to be checked in the template overrides
Title: Re: some constants are not translated on the bilingual site
Post by: jjk on November 16, 2021, 21:08:30 PM
Quote from: michelerighetti on November 16, 2021, 09:06:01 AM

I don't understand i ?? in some fields. What is the meaning of those ??
What is the difference between ** and ??

You see those if you look at your site with Joomla language debug enabled.

**Joomla CMS**
   (text surrounded by asterisks) indicates that a match has been found in the language definition file and the string has been translated.

??Joomla CMS??
   (text surrounded by pairs of question marks) indicates that the string is translatable but no match was found in the language definition file.

Joomla CMS
   (text with no surrounding characters) indicates that the string is not translatable.

And to see any possible problems with Joomla language debug enabled, you need to click the full width gray drop-down tabs at the bottom of the page under (**Joomla! Debug Console**.