Hello Phoca team,
I'm using J3.2.1 with Phoca Maps 3.0.0 and loaded the Dutch translation files 3.0.0-Alpha.
This results both in the en-GB and nl-NL files to be loaded into the frontend and backend.
Within the components/com_phocamaps/views/map/tmpl/default.php in line 79 the COM_PHOCAMAPS_FROM_ADDRESS tag is used for translating the text in front of the route selection box in the frond end. This tag however is not picked up from the language files! Not even the English version! If I edit the COM_PHOCAMAPS_FROM_ADDRESS="From Address" into something else in the English file, nothing happens! So no wonder that the NL translation is not coming up. This whole substituation is skipped.
And even worse: I tried the following in default.php:
echo JText::_('COM_PHOCAMAPS_FROM_ADDRESS').': <input class="pm...... changed this into
echo 'TEST: <input class="pm.......
And nothing happened!
The same applies for the COM_PHOCAMAPS_GET_ROUTE="Get Route" text. This also can not be changed in any way!
I can not trace the PHP code, but i guess that Joomla should work fine, but that whatever is put in, is not being picked up by the Google API. Can it be that the API has been changed?
I hope you can find the error behind it.
Thanks in advance!
Regards, Rob
No translation of Route selection - Google API error?
-
- Phoca Member
- Posts: 27
- Joined: 14 Jan 2011, 21:15
- Location: Netherlands
- Contact:
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: No translation of Route selection - Google API error?
Hi, are you using component or plugin (see similar posts in this forum, user have had problems with not up-to-date translation of their langauge) ...
See here:
https://www.phoca.cz/joomla3demo/phoca-maps-demo
https://www.phoca.cz/joomlademo/phoca-maps
Bot are translated normally
The code is standard code:
components\com_phocamaps\views\map\tmpl\default.php
So try to see similar posts and check the translation file
Jan
See here:
https://www.phoca.cz/joomla3demo/phoca-maps-demo
https://www.phoca.cz/joomlademo/phoca-maps
Bot are translated normally
The code is standard code:
components\com_phocamaps\views\map\tmpl\default.php
Code: Select all
echo JText::_('COM_PHOCAMAPS_FROM_ADDRESS').'
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 27
- Joined: 14 Jan 2011, 21:15
- Location: Netherlands
- Contact:
Re: No translation of Route selection - Google API error?
Hi Jan,
I have both the en-GB and the nl_NL ini files in both the admin/backend language dir as in the frontend language dir. So that workts fine and give me the translation of all the string using maps. That is not the problem and not the cause. This goes specifically about the FROM_ADDRESS and GET_ROUTE placeholders for the Google routing function.
I do not think it is a translation error within the Joomla code. I think Joomla works fine. I guess that the Google API is not accepting the "translated" parameters given to the API and that Google returns the default text itself.
Please try within your test-system to set the default frontend language to for instance German (or any other language you have loaded). And then see what happens at your https://www.phoca.cz/joomlademo/phoca-maps site. I think that there is still From address: underneath the Maps routing widget. And if so, it would confirm my theory that something is going wrong in the API area.
Hope you will take the time to try this out.
Regards,
Rob.
I have both the en-GB and the nl_NL ini files in both the admin/backend language dir as in the frontend language dir. So that workts fine and give me the translation of all the string using maps. That is not the problem and not the cause. This goes specifically about the FROM_ADDRESS and GET_ROUTE placeholders for the Google routing function.
I do not think it is a translation error within the Joomla code. I think Joomla works fine. I guess that the Google API is not accepting the "translated" parameters given to the API and that Google returns the default text itself.
Please try within your test-system to set the default frontend language to for instance German (or any other language you have loaded). And then see what happens at your https://www.phoca.cz/joomlademo/phoca-maps site. I think that there is still From address: underneath the Maps routing widget. And if so, it would confirm my theory that something is going wrong in the API area.
Hope you will take the time to try this out.
Regards,
Rob.
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: No translation of Route selection - Google API error?
Hi, I have tested it many times with different languages (e.g. german, czech, etc.).
See the image (enabled german language from today):
I think, this is not a Google API error, as both strings are not included directly in API (and even if they will be, they are sent to API translated).
As I wrote, try to see similar posts in this forum, there were similar problems. I think (it was some months or year ago I see the posts, so I am not sure) this was some problem with the translation (if e.g. not included in both language folders, or if the translation was not correct - error inside the translation which then prevents displaying the language - e.g. missing ", or the strings were not translated)
Are you sure, both strings are translated to dutch in your language file? Are the translation files correct, without errors? Are all 4 files located in right folders - 2 in frontend language folder, 2 in backend language folder?
Jan
See the image (enabled german language from today):
I think, this is not a Google API error, as both strings are not included directly in API (and even if they will be, they are sent to API translated).
As I wrote, try to see similar posts in this forum, there were similar problems. I think (it was some months or year ago I see the posts, so I am not sure) this was some problem with the translation (if e.g. not included in both language folders, or if the translation was not correct - error inside the translation which then prevents displaying the language - e.g. missing ", or the strings were not translated)
Are you sure, both strings are translated to dutch in your language file? Are the translation files correct, without errors? Are all 4 files located in right folders - 2 in frontend language folder, 2 in backend language folder?
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 27
- Joined: 14 Jan 2011, 21:15
- Location: Netherlands
- Contact:
Re: No translation of Route selection - Google API error?
Hi Jan,
I read your reply late last night, just before going to bed, and it kept me awake for a while... because I began to understand what went wrong!
I wasn't enough aware of the the fact that there is a component AND a plugin which have both their OWN translation files. I was sure I loaded a translation file, but that was the one from the component! So this morning I added a menu item to connect to the Phoca Maps component and indeed: Nicely translated in Dutch! So the component translation file worked well.
Then back to the plugin and looked at your downloads and saw that the 3.0 NL translation isn't there yet! BINGO
I manually modelled the NL ini files conform the en-GB layout which were already in the 3.0 plugin package, and combined that with the old 2.5 nl-NL translation content. And voila... there are my Dutch translations on the site.
With that knowledge, I've created a new Maps Plugin 3.0.0 NL Translation zip file and send it to your friends at Magic-Solutions. I guess that will then be published soon so other users can take advantage of it.
Thanks for your guidence and all the best for 2014 !
Regards, Rob.
I read your reply late last night, just before going to bed, and it kept me awake for a while... because I began to understand what went wrong!
I wasn't enough aware of the the fact that there is a component AND a plugin which have both their OWN translation files. I was sure I loaded a translation file, but that was the one from the component! So this morning I added a menu item to connect to the Phoca Maps component and indeed: Nicely translated in Dutch! So the component translation file worked well.
Then back to the plugin and looked at your downloads and saw that the 3.0 NL translation isn't there yet! BINGO
I manually modelled the NL ini files conform the en-GB layout which were already in the 3.0 plugin package, and combined that with the old 2.5 nl-NL translation content. And voila... there are my Dutch translations on the site.
With that knowledge, I've created a new Maps Plugin 3.0.0 NL Translation zip file and send it to your friends at Magic-Solutions. I guess that will then be published soon so other users can take advantage of it.
Thanks for your guidence and all the best for 2014 !
Regards, Rob.
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: No translation of Route selection - Google API error?
Great to hear it.
Jan
Jan
If you find Phoca extensions useful, please support the project