Important announcements from CouchCMS team
73 posts Page 7 of 8
Previous 1 ... 4, 5, 6, 7, 8 Next
@Subhamoy, thanks for the heads-up.
Issue has been fixed.
Hi KK,

I have a site using the multi lingual add on which has just started showing the same error (Deprecated: Array and string offset access syntax with curly braces is deprecated). How did you fix this? Do I need to upgrade the plugin?

Thanks, Daz
@kk, first of all, thanks again, this is to be one of the essential addons to the great CMS and looks also very neat to implement! I however, would like to ask for an advice - there must be something I am missing:

I have composed a very crude testing site - 2 languages (English and Finnish) with just 3 linked pages to see how it works, added the multilang addon, added editable fields as per the documentation and added all sorts of language listing and switches that you are mentioning.
As of now, with pretty URLs on the URL automatically redirects to ".../en/". In the EN version I can browse all three pages and can switch any of them to Finnish (that is to .../fi/endpage"). In the Finnish version, however, if I try to open another page, I am redirected to the target page in English version. In effect, if I can only speak Finnish, I cannot browse the sitein Finnish only.

In the crude menu the links are like this:
Code: Select all
<a href="<cms:show k_site_link />index.php">home</a>
<a href="<cms:show k_site_link />about-us.php">about us</a>
<a href="<cms:show k_site_link />xxx.php">xxx</a>

Certainly I have tried combinations with
Code: Select all
<a href="<cms:show k_site_link /><cms:show k_lang />/about-us.php">about us</a>

Code: Select all
<a href="<cms:show k_page_link />about-us.php">about us</a>

From https://mydomain/folder/fi/ it should give me https://mydomain/folder/fi/about-us.php (that is what I see when hovering over the link), but if I click it, I always get
Not Found
The requested URL /folder/fi/about-us.php was not found on this server

My htaccess rule (simiar for all three pages) looks like
Code: Select all
RewriteRule ^(?:en|fi)/about-us$ "$0/" [R=301,L,QSA]
RewriteRule ^(en|fi)/about-us/$ about-us.php?lc=$1 [L,QSA]
RewriteRule ^(en|fi)/about-us/.*?([^\.\/]*)\.html$ about-us.php?pname=$2&lc=$1 [L,QSA]
RewriteRule ^(en|fi)/about-us/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ about-us.php?d=$2$3$4&lc=$1 [L,QSA]
RewriteRule ^(en|fi)/about-us/[^\.]*?([^/\.]*)/$ about-us.php?fname=$2&lc=$1 [L,QSA]
RewriteRule ^(?:en|fi)/about-us/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

which looks good to me.

What could I be doing wrong? Is it a problem with RewriteBase then? I have has the same results on localhost, where possible hosting provider`s limitations would not apply. It would be very much appreciated if any of you gentlemen you could point me in some direction...

Edit: clicking that link actually gets me to "https://mydomain/folder/fi/about-us.php" with that "Not Found" message. If I, however, change that URL to "https://mydomain/folder/fi/about-us", the page comes in. So it indeed looks more like a htaccess thing.

Edit2: Forget about it, I am an idiot, obviously. The menu link needs to be like
Code: Select all
<a href="<cms:show k_site_link /><cms:show k_lang />/about-us/">about us</a>
, works now neatly.
@kk, please feel free to delete this post unless you feel it may be helpful to anybody.
I like how a cloned page may have unlimited Drafts. This gives an example for ` sets ` of pages in various languages.

A good search (and filter) is almost a requirement, but results quickly become irrelevant with homonyms present in similar languages: Spanish "una crisis cultural" would show results for "cultural crisis" in English. There are thousands identically-written words with latin charset. In a context (separate templates, domains), there is no problem — imagine a bookstore where a visitor in Spanish section of the store is redirected to ` spanish search processor `, searching only spanish-related pages. However having multiple masterpages is a pain. How about separate cloned pages with a page per lang?

A product page would be a cloned page in an imaginary ` shop / index.php ` and have all fields defined in a single place, where editable fields would be dependent on a lang-selector in the edit-view in admin panel. So, in order to have the same product in another language, the original page is cloned → lang-selector set to the second language → lang-dependednt inputs (descriptions, seo keywords etc) are filled in the second language. Common fields (pp_price) left as is (with cloned values).

A few small tweaks and Fulltext Search works fine, showing results from language-specific cloned pages. Cloned pages in admin-panel may be organized visually into ` sets ` or left as is with a few tweaks to know the language of the page. Page manipulations (unpublish, edit common values etc.) should be bound to the other pages, similar to how present Addon bounds commong assets, perhaps via displaying the values from the ` main ` lang (e.g. EN).
Hello KK,
I tried implementing a multi-lingual website by following your tutorials and also the guide below. However I keep getting this error: ERROR: Tag "editable": 'name' contains invalid characters. (Only lowercase[a-z], numerals[0-9] and underscore permitted. The first character cannot be a numeral).

I found what the issue is. In my multi-lang config file I used the following langs:
Code: Select all
{"en":"English","fr":"French","pt":"Portuguese","zh":"Chinese","in-en":"Indian English"}

Now the lang for Indian English has a hyphen separated lang which is not allowed when creating editable field names.

This is how I used it in my template:
Code: Select all
<cms:each k_supported_langs as='lang' key='lc'>
  <cms:editable type='text' name="title_<cms:show lc />" label="Title (<cms:show lc />)" order='1' />

How about modifying the following
"in-en":"Indian English"

to make it as follows?
"in_en":"Indian English"
The code block below in the COUCH CMS template block doesn't work:
Code: Select all
<cms:editable type='group' name="important_links_group" label="Important Links" order="80" collapsed='1' >
  <cms:repeatable name='important_links' label='Important links' order='80' group="important_links_group" >

      <cms:each k_supported_langs as='lang' key='lc' >

        <cms:editable name="important_link_title_<cms:show lc />" label="Link title (<cms:show lang />)" type='text' order="<cms:show k_count />"  />

    <cms:editable name='important_link' label='Link' type='text'  order='6' />


Is there something I am missing
I did that and it worked perfectly. Thank toy very much. However I faced another challenge. I have posted it above

KK wrote: @adimpressions,

How about modifying the following
"in-en":"Indian English"

to make it as follows?
"in_en":"Indian English"
The code block below in the COUCH CMS template block doesn't work:
Is there something I am missing

<cms:repeatable> tag expects (and recognizes) only <cms:editable> tags as its immediate children.
In your code, the immediate child is <cms:each> which is not recognized and hence never executes.

I think you'll have to go the entire nine yards and hand code in full all child editable regions that will repeat.
Oh, I recall busting my head with exactly that as well. :D To no good result, I think. :(

@adimpressions Maybe a stupid idea ... what about switching the logic by having the repeatable within the each and iterating the repeatable set foe individual langs? My imagination is completely off now, tho, I think I was trying that too, only cannot remember to what avail.
Previous 1 ... 4, 5, 6, 7, 8 Next
73 posts Page 7 of 8