VirtueMart Forum

VirtueMart 2 + 3 + 4 => Language/Translations => Topic started by: Geppux on April 26, 2017, 17:44:47 PM

Title: [SOLVED] Wrong language in vm3 menu
Post by: Geppux on April 26, 2017, 17:44:47 PM
VM 3.2.1 - J 3.7.0

I have a small problem, probably is something stupid, but I searched without success...
I have the backend all in italian but the lateral menu of virtuemart is in english!
I installed the italian files but no succes... what can it be?

Thank you.
Title: Re: Wrong language in vm3 menu
Post by: jjk on April 26, 2017, 23:03:55 PM
Works in my case (with German language files). Perhaps install the Italian language pack available at http://virtuemart.net/community/translations again.
Also you could enable the Joomla 'Debug Language' in the configuration and check if the file ...\administrator\language\it-IT\it-IT.com_virtuemart.ini is loaded.

Note that some users with multilanguage websites reported language issues after updating to Joomla 3.7.0. Some issues are already listed in the Joomla tracker.
However, some issues may be due to a change in how language ini files are parsed by Joomla. Might take a few days until the component developers come up with solutions addressing that change.
Title: Re: Wrong language in vm3 menu
Post by: Geppux on April 27, 2017, 10:20:56 AM
Thank you JJK for the answer.
I already reloaded the language files several times but is always the same. I don't think is an issue regarding multilingual sites because I have the same on 2 sites, one multilingual and the other not. I'll wait the developers find what's wrong, it's not a problem to have it in english... all the other things seems to work properly.
Title: Re: Wrong language in vm3 menu
Post by: tutek on April 27, 2017, 13:24:14 PM
Hello,
I have the same problem.
Joomla: 3.7.0 VirtueMart: 3.2.1

I have installed Polish, but the system shows that it does not load.

What could be the reason?
Title: Re: Wrong language in vm3 menu
Post by: Jörgen on April 27, 2017, 14:17:05 PM
Hello

My guess would be Joomla 3.7.0. There are appearantly some issues reagarding the loading of languages. If the fixes have to be done in Joomla or the extensions is hard to tell right now.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Wrong language in vm3 menu
Post by: jjk on April 27, 2017, 21:04:21 PM
Quote from: tutek on April 27, 2017, 13:24:14 PM
Hello,
I have the same problem.
Joomla: 3.7.0 VirtueMart: 3.2.1

I have installed Polish, but the system shows that it does not load.

What could be the reason?

Ok - I checked this one. The problem with this one and probably also some other languages is that some translators used "_QQ_", which is an old Joomla method to escape " (double quotes)  instead of the single quotes ' in the en-GB source file strings, which Transifex (currently) translates into "_QQ_"_QQ_"_QQ_" and Joomla 3.7.0 doesn't tolerate that anymore. (There are still hundreds of "_QQ_ " in the Joomla language files, although using this is deprecated since a long time already).

In order to solve this issue in VM translations, turn on 'Debug Language' in Joomla configuration, then open your VM pages and look for 'Parsing Errors in Language Files' at the bottom of the view. If there are any, the 'Parsing Errors' tab will list the language file(s) and the lines which fail to parse. Open these files in an Editor like Notepad or Notepad++ (Do not use a Word processor like MS Word!), scroll down to the lines which failed to parse and replace any  "_QQ_"_QQ_"_QQ_" with ' (single quote). Don't forget to save the file.

I'll send a message to Translators on Transifex, that they should look through their translations and replace any occurance of  "_QQ_".
Title: Re: Wrong language in vm3 menu
Post by: CE WebDesign München on April 29, 2017, 10:28:15 AM
if you don't want single quotes ( ' ),
you can escape double quotes like this: \"

https://github.com/joomla/joomla-cms/issues/13421#issue-198146295
Title: Re: Wrong language in vm3 menu
Post by: jjk on April 29, 2017, 11:40:17 AM
Quote from: gogo123 on April 29, 2017, 10:28:15 AM
if you don't want single quotes ( ' ),
you can escape double quotes like this: \"

No! If you escape double quotes in source language files like this, the translation platforms like Transifex and Crowdin. which are used by many extension translators (including VirtueMart translators), will create garbage in the downloadable translations, that results into parsing errors. Either use single quotes or an html entity for double quotes.
Title: Re: Wrong language in vm3 menu
Post by: CE WebDesign München on April 29, 2017, 12:14:54 PM
OMG! Thanks for pointig out!
But for language overrides like in joomla/language/overrides/de-DE.override.ini it is ok to replace all _QQ_ with /"   ?
Title: Re: Wrong language in vm3 menu
Post by: Geppux on April 29, 2017, 12:18:02 PM
tI turned on the language debug on my site and in the enclosed image are the results... It seems There are no errors in the language files but  it seems there are not the translations, right?
Title: Re: Wrong language in vm3 menu
Post by: Geppux on April 29, 2017, 12:57:27 PM
For the italian version the problem has been solved... now the language files are written in the correct way and installing the new version solved the problem.
Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: jjk on April 29, 2017, 14:16:19 PM
Quote from: gogo123 on April 29, 2017, 12:14:54 PM
OMG! Thanks for pointig out!
But for language overrides like in joomla/language/overrides/de-DE.override.ini it is ok to replace all _QQ_ with /"   ?

If you edit your language overrides in Joomla administration 'Extensions' > 'Language(s)' > 'Overrides', you can enter " directly. Otherwise it is more safe to use the html entity  "
Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: tutek on May 05, 2017, 12:20:18 PM
Hello

Helped me to remove some lines from the translation where they were "_QQ _" _ QQ _ "_ QQ_".

The language file was correctly loaded.
Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: cmvrgr on May 05, 2017, 14:45:15 PM
I have the exact same problem with Greek language. Can someone write a step by step guide to fix the problem ?

Thanks
Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: jjk on May 05, 2017, 23:35:03 PM
@cmvrgr
Meanwhile the triple "_QQ_" should be eliminated from the automatically generated language packs. Please download and install the current Greek translation files from here and check if that solves your problem: http://virtuemart.net/community/translations
Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: cmvrgr on May 06, 2017, 00:37:19 AM
Quote from: jjk on May 05, 2017, 23:35:03 PM
@cmvrgr
Meanwhile the triple "_QQ_" should be eliminated from the automatically generated language packs. Please download and install the current Greek translation files from here and check if that solves your problem: http://virtuemart.net/community/translations
I download them and the problem exists. What else should do ? Any ideas ?

Στάλθηκε από το HUAWEI NXT-L29 μου χρησιμοποιώντας Tapatalk

Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: CE WebDesign München on May 06, 2017, 08:39:36 AM
@jjk Thanks for the info :)
About the html entity " infograf768 posted that html entity can't be used in href
( https://github.com/joomla/joomla-cms/pull/15714#issuecomment-298346084 )
and suggests to use single quotes instead of escaped double quotes in this case.
Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: jjk on May 06, 2017, 12:47:05 PM
Quote from: cmvrgr on May 05, 2017, 14:45:15 PM
I have the exact same problem with Greek language. Can someone write a step by step guide to fix the problem ?
It is a Joomla problem. While the triple "_QQ_" are eliminated now from the translations on Transifex, the single "_QQ_" (which has be used in Joomla as a method to display double quotes in language strings) still is present in some language files. Due to a change in Joomla 3.7, Joomla doesn't parse the "_QQ_" correctly anymore. Open the file ...\administrator\language\el-GR\el-GR.com_virtuemart.ini with an Editor like the free Notepad++ and replace all "_QQ_" with a ' (single quote). Save the file and clear your administrator and site cache files. This should solve your problem. Do the same with your other Greek VirtueMart language files.
Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: jjk on May 06, 2017, 12:55:11 PM
Quote from: gogo123 on May 06, 2017, 08:39:36 AM
@jjk Thanks for the info :)
About the html entity " infograf768 posted that html entity can't be used in href

Tested the single quotes and other methods to escape double quotes in hrefs a few days ago. In my test single quotes didn't work correctly in hrefs either. Joomla 3.7.0 failed to detect the trailing single quote. But in my opinion it doesn't make sense to use quotes in hrefs. The browser highlights the link already.
Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: CE WebDesign München on May 08, 2017, 09:20:10 AM
@jjk Thanks again :)
I posted the issue (link-thread above), 
can you give details/example to reproduce the issue with Joomla 3.7.0 failing to detect the trailing single quote in href?
Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: jjk on May 08, 2017, 11:17:02 AM
Quote from: gogo123 on May 08, 2017, 09:20:10 AM
I posted the issue (link-thread above), 
You don't need to do that. I'm subscribed to the Joomla tracker issue (using the alias Gitjk over there)
I think the issue with the trailing single quote was due to a syntax error in the copied example I used for testing.
Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: CE WebDesign München on May 08, 2017, 11:26:31 AM
@jjk Great, thanks for clarification and fast support :)
So it is save to use single quote in href
Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: cmvrgr on May 08, 2017, 14:35:03 PM
Any solution ?

Στάλθηκε από το HUAWEI NXT-L29 μου χρησιμοποιώντας Tapatalk

Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: jjk on May 08, 2017, 18:26:01 PM
@cmvrgr
I did describe the solution for you above. However, to make it even more easy for you, I did adjust the Greek translation on transifex.com since nobody of the Greek translators did it yet. Download and install the adjusted language packs from here again: http://virtuemart.net/community/translations
Title: Re: [SOLVED] Wrong language in vm3 menu
Post by: cmvrgr on May 09, 2017, 02:32:11 AM
Quote from: jjk on May 08, 2017, 18:26:01 PM
@cmvrgr
I did describe the solution for you above. However, to make it even more easy for you, I did adjust the Greek translation on transifex.com since nobody of the Greek translators did it yet. Download and install the adjusted language packs from here again: http://virtuemart.net/community/translations
Now they are working perfectly.

Thanks for your help.