Important announcements from CouchCMS team
73 posts Page 4 of 8
Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Hi @KK

have a question about advanded routing with this module

for all languages we have one template. for example it will be aboutus.php

for example we have 3 en, ru and lt languages

in couch/addons/multilang/config.php we have:

Code: Select all
   $cfg['langs'] = array(
      'en'=> 'English',
      'ru'=> 'Русский'
      'lt'=> 'Lietuviškai',
       $cfg['prettyurls'] = 1;

at couch/config.php we have:
Code: Select all
   define( 'K_PRETTY_URLS', 1 );

at result we will have


all is great, but how to make one template with multiple ursl by seo uri:


how to make this one solution?


maybe you can modify this awesome module and integrate this feature?


and have another question about template with clonable='1' and included this multilang addon

for example we have news mini blog with 3 languges too.

how to make this solution:


where are:

but as result it should be one template blog.php with one "article" page (one page_id)

how i see in this forum, i'm not alone with this question (viewtopic.php?f=4&t=11549)
@trendoman has tried to device a solution to this problem (viewtopic.php?f=4&t=11549#p31555) and, as you can see, there is no easy way out at the moment.

Anyway, have you tried @trendoman's solution?
yes, I tried, but not works
Hello and thanks for this great addon!

I have one issue which is needed because of SEO.

I would like to have links like this:

- Default language is english, it is not present in URL, and it should be link like
Other languages should be present in URL like

Do you think this is possible? How should I edit .htaccess? Thanks a lot!

I'm currently playing around with this add-on on a site I'm building. It works pretty well so far but I am having an issue with Couch's search facility. I quickly realised that I couldn't use the <cms:search_form /> tag and so used the direct output from that so I could change the text of the input and submit fields as well as the processing URL.

So now I've done that, the processing URL is showing correctly in the code in the non default language (French) with the URL:
http://localhost:8888/search.php?lc=fr, however when I use the search the language code reverts to the default (English) giving the URL: http://localhost:8888/search.php?s=testing&nc=1&lc=en

Additionally the search terms are coming back a mix of English and French although this is possibly because some of the site has not been converted into multi languages yet.

I also wondered if it was possible to have a <cms:set> tag that included the <cms:get> and <cms: show> that can be used to automatically add the language code? Something like:

Code: Select all
<cms:set my_var = "<cms:get 'tmp_var_<cms:show lc/>' />" />

I want to use something like this to set the variable my_var which is then used within an embedded snippet. I couldn't get it to work and so used the below cms:if loop instead but would be better the above method if possible?

Code: Select all
<cms:if k_lang='en'>
    <cms:set pageTitle = hp_meta_title_en />
    <cms:set pageDescription = hp_meta_description_en />
<cms:else_if k_lang='fr' />
    <cms:set pageTitle = hp_meta_title_fr />
    <cms:set pageDescription = hp_meta_description_fr />

<cms:embed 'page-top.php' />

Finally, before I continue with using the add-on, I just wanted to know if there were any other issues with it being used alongside, for example, <cms:mosaic> which I've used quite prominently.

Can you help?
Thanks, Daz
Before any digging, I can suggest this - you may use tag cms:put to create any custom variables with dynamic names -
Code: Select all
<cms:put var="my_var_<cms:show lc />" value='some value' />

Also you may rewrite the 'cms:if loop' and set any common variable as follows (with default param being unnecessary but helpful) -
Code: Select all
<cms:set pageTitle = "<cms:get "hp_meta_title_<cms:show lc />" default=hp_meta_title_en />" />
Hi Trendoman,

That second snippet actually does what I need. I didn't know that you could have nested pairs of double quotes like that and that's why it hadn't worked previously.

A side note, I also realised that I wasn't setting the 'lc' variable anywhere, I've changed to k_lang (as I was using elsewhere) and that's working now. Here's the code:

Code: Select all
<cms:set pageTitle = "<cms:get "hp_meta_title_<cms:show k_lang />"/>" />

I still have the issue with the search? Is search going to be an issue for the add on?

A side note, I also realised that I wasn't setting the 'lc' variable anywhere, I've changed to k_lang (as I was using elsewhere) and that's working now.

Daz, you are correct. The proper var is k_lang, perhaps something else distracted me at the moment. :)

The search+multilanguage issue needs investigation, I haven't tried stock search with the addon myself, so can't say what is going on and it wasn't clear from your explanation either.. I think someone could test that combination and see what's going on. ML addon is known to redirect page to itself after adding 'lc={lc}' to the url and this might be the source of trouble with urls. However if you provided lc in the url beforehand (manually or with tag "<cms:show_with_lc my_search_link >") then it's probably something else.
It would help if you post everything (and only) needed codes and templates to quickly recreate the problem locally if someone's going to check that sooner than later.
Thanks Trendoman. I'll put together a basic recreation of the issue and send over the templates for review. Hopefully tomorrow or early next week.

thank you for the addon; for me everything works fine with prettyurls enabled in couch/config.php, but as I enable prettyurls option within the addon ($cfg['prettyurls'] = 1;) to prettify the ?lc=lang urls I get Page not found.
I probably messed something up in the process; I'm guessing it has something to do with .htaccess (link - generated after installing the addon..Anyone with the same problem? Could someone please help, thank you
Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
73 posts Page 4 of 8