Page 1 of 3

XH Multilanguage support

Posted: Sat Jul 18, 2015 3:37 am
by kurtm
HI!
I'm trying to find information on setting up secondary languages (multilanguage).
Obviously CMSimple XH has the capability but I can't find any information on this Forum or the WIKI or in the 'User Manual'.
I gather there has been some changes in how this is accomplished in newer versions(?).
I added a two character named folder (de) at the root level but that didn't add anything when in Edit or View mode.
What's the secret??
Thanks - kurtm

Re: XH Multilanguage support

Posted: Sat Jul 18, 2015 9:41 am
by svasti
Well, it has become a little tricky...
you rename the 2lang folder to the name off your secondary language, plus under content you also need to create a new content folder for the secondary language, (just copy the content folder of the main language) e.g.:

Your domain (base folder)
...de
...|-2lang
...|-index.php
...content
...|-content.htm
...|-.htaccess
...|-de
.......|-content.htm
.......|-.htaccess

We are considering making this process a little easier in the coming versions.

Re: XH Multilanguage support

Posted: Sat Jul 18, 2015 10:07 am
by cmb
See also the information about multilingual sites in the Wiki.

Re: XH Multilanguage support

Posted: Tue Jul 21, 2015 12:55 am
by kurtm
Brilliant! It works as you explained.
Just a comment - I searched on the WIKI and nothing was found in the search for 'multilanguage'. Maybe there needs to be some more search words on the page.
Thanks folks!
kurtM

Re: XH Multilanguage support

Posted: Wed Jul 22, 2015 10:21 pm
by cmb
kurtm wrote:Just a comment - I searched on the WIKI and nothing was found in the search for 'multilanguage'. Maybe there needs to be some more search words on the page.
I've added the respective search keyword "multilanguage" on the page. Thanks for the hint! :)

Re: XH Multilanguage support

Posted: Mon Aug 03, 2015 1:06 am
by kurtm
I am using zGallery with a multilangiage site. Problem is that the paths to button images used when viewing the lightbox which are in the plugin, the links fail because they include the second language folder. Ie., /de/plugins/zgallery/jQlightbox/images/lightbox-btn-close.png . The /de/.. in the path should not be there.
I'm going to experiment with options to use the same gallery folder for both languages as I don't really want to upload everything twice when the contents are the same.

Re: XH Multilanguage support

Posted: Mon Aug 03, 2015 4:57 am
by kurtm
Okay - while I can easily make a link to the primary gallery folder from the second language pages, it doesn't resolve the path to the lightbox icons. It also brings the user to the primary language pages. Uummm.. maybe an iframe is simplest for the pictures. But the icons are still a problem.

Later... okay - I created a path to /de/ folders the same as above, and placed copies of the button icons there. Obviously that works but it's not a professional solution.

kurtm

Re: XH Multilanguage support

Posted: Mon Aug 03, 2015 11:44 am
by cmb
How do you call the plugin? It seems to me that you have to adjust the path to the gallery in the plugin call. For main language:

Code: Select all

{{{PLUGIN:zgallery('gallery/folder_name');}}}
For additional languages:

Code: Select all

{{{PLUGIN:zgallery('../gallery/folder_name');}}}

Re: XH Multilanguage support

Posted: Tue Aug 04, 2015 12:48 am
by kurtm
Yes Christoph, that's what I did to get to use the same gallery folder for both languages. However, it doesn't solve the path to the gallery application buttons which are the 'forward', 'back' and 'exit' .png files. The path to these includes the secondary language (/de/). Obviously there is nothing to display as the path doesn't exist. See: http://www.marquart.org/de/?LINKS/pix&normal
My quick solution was to add these folders and put the .png files there too. I've just disbled these so you can see what I mean.

Have fun!
Kurt

Re: XH Multilanguage support

Posted: Tue Aug 04, 2015 1:30 am
by cmb
Ah, I see, Kurt; thanks for the link. Apparently, the problem is that the URLs are hard-coded in plugins/zgallery/jQlightbox/js/jQlightbox.js. One solution might be to pass a variable ($pth['folder']['base']) to JS (actually, a <script> element in the generated HTML), and to use it there.

Anyhow, you may consider to contact Holger, the author and maintainer of lb_Gallery, for a copy. I presume that switching to this plugin wouldn't cause considerable issues, and, to my knowledge, lb_Gallery is currently the best (and perhaps only) maintained successor of Svarrer's Gallery.