XH Multilanguage support

Please post answers on the most frequently asked questions about CMSimple
kurtm
Posts: 38
Joined: Tue Sep 03, 2013 12:29 am
Location: New Zealand

XH Multilanguage support

Postby kurtm » Sat Jul 18, 2015 3:37 am

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

svasti
Posts: 1650
Joined: Wed Dec 17, 2008 5:08 pm
Location: Bielefeld, Germany
Contact:

Re: XH Multilanguage support

Postby svasti » Sat Jul 18, 2015 9:41 am

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.

cmb
Posts: 12007
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: XH Multilanguage support

Postby cmb » Sat Jul 18, 2015 10:07 am

See also the information about multilingual sites in the Wiki.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

kurtm
Posts: 38
Joined: Tue Sep 03, 2013 12:29 am
Location: New Zealand

Re: XH Multilanguage support

Postby kurtm » Tue Jul 21, 2015 12:55 am

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

cmb
Posts: 12007
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: XH Multilanguage support

Postby cmb » Wed Jul 22, 2015 10:21 pm

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! :)
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

kurtm
Posts: 38
Joined: Tue Sep 03, 2013 12:29 am
Location: New Zealand

Re: XH Multilanguage support

Postby kurtm » Mon Aug 03, 2015 1:06 am

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.

kurtm
Posts: 38
Joined: Tue Sep 03, 2013 12:29 am
Location: New Zealand

Re: XH Multilanguage support

Postby kurtm » Mon Aug 03, 2015 4:57 am

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

cmb
Posts: 12007
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: XH Multilanguage support

Postby cmb » Mon Aug 03, 2015 11:44 am

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');}}}
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

kurtm
Posts: 38
Joined: Tue Sep 03, 2013 12:29 am
Location: New Zealand

Re: XH Multilanguage support

Postby kurtm » Tue Aug 04, 2015 12:48 am

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

cmb
Posts: 12007
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: XH Multilanguage support

Postby cmb » Tue Aug 04, 2015 1:30 am

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.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+


Return to “FAQ's”

Who is online

Users browsing this forum: No registered users and 2 guests