Do you have some feature in mind that you'd love to see in Couch? Let us know.
7 posts Page 1 of 1
hi,

it would be really fantastic if couch could have true multilingual support for site building.

it's one of the things that is holding me back from using it in more sites.
I agree, however - you should define what would really be that what you want to see.
Probably a way to reduce <cms:if my_lang="xx"> type of tags.

I thought about the process, and it would make sense to have each admin page, in like tabbed content for different languages, when you enter content.

So what I'm looking is, actually tabbed interface inside couch, and probably stating that this editable tag has 3x tabs.

Another idea I thought off, would be something like one tag, x inputs (per each language).

I have no problems with the current system, although the count of "if's" are too damn high.
Some time ago I tried to add two extra tables to the couch database, table 1 language_code and table 2 translation:

Table 1 fields where:
lang-code: en
lang-name: English ....

Table 2 fields where:
translation_ID: 1
lang-code: en
field: couch field
tanslated-text ; english text

Added to the couch fields table a column lang-code.

Next I had figured out how to return the field: couch field -- from the corresponding lang-code: en by using the query tag from couch. (I suppose this could be coded as a couch tag <cms: lang>)

I'm somewhat php dyslexic so I couldn't find a way to store the translation from the admin pages in couch to the Tables and stopped my attempts . Maybe someone whom is less php disabled can do something like this.
I load frameworks and write bugs on top of them, after that I rearrange the code so that it looks like a cool product.
This should become a bit more manageable in 1.4.5 with template grouping in the sidebar and the ability to place editable regions in tabs.

Have you been using the get tag at least @lolsteamroller? Instead of doing the following every time you want to display different editable region content:
Code: Select all
<cms:if my_lang == 'de'>
    <cms:show de_content/>
<cms:else/>
    <cms:if my_lang == 'fr'>
        <cms:show fr_content/>
    <cms:else/>
        <cms:show en_content/>
    </cms:if>
</cms:if>
You would validate the my_lang variable once (if it isn't from a trusted source) and then every subsequent use you would only do:
Code: Select all
<cms:get "<cms:show my_lang/>_content"/>
lolsteamroller wrote: I thought about the process, and it would make sense to have each admin page, in like tabbed content for different languages, when you enter content.

So what I'm looking is, actually tabbed interface inside couch, and probably stating that this editable tag has 3x tabs.

Another idea I thought off, would be something like one tag, x inputs (per each language).


i also thought about the things that you mentioned. tabbed content for different languages seems to be the most common way, but maybe there should be an option to also have an option input field as well. if there are many languages, then the tabbed solution would not be appropriate.

some ideas:
- option for the user to create the new language tab from the admin area; not only programmatically
- option to publish individual languages for page content
- language option for media files
- option for side-by-side language editing
- somehow take all the steps from this post: viewtopic.php?f=8&t=74 and make it part of the system
I would be like to have the option to go through all rendered elements (static or from db) using gettext function and a propper po / mo file. An attribute translate could be index the part as translatable element. Should be that complicated to implement actually, since it's almost standard php.

Maybe it's also possible to write an AddOn doing this? I would like to to this, but I couldn't find any documentation for writing addons. Are there some hooks where to inject additional functions in before rendering, after db-fetching etc. like in Wordpress?
abimelex wrote: I would be like to have the option to go through all rendered elements (static or from db) using gettext function and a propper po / mo file. An attribute translate could be index the part as translatable element. Should be that complicated to implement actually, since it's almost standard php.

Maybe it's also possible to write an AddOn doing this? I would like to to this, but I couldn't find any documentation for writing addons. Are there some hooks where to inject additional functions in before rendering, after db-fetching etc. like in Wordpress?



There's no documentation on the site because couch keeps it simple and wants to focus on the "design first" part of the site/CMS (adding technical docs takes away from this)

But, KK has said before there is documentation in the code somewhat. The best possible way to learn about writing addons is looking through couches code. Also, most new features are created as addons by KK and if you look through the addons in the /addons/ folder you can see how flexible couch can be.

I don't know if it's possible to hook before render, I have delved into couch but not that deeply yet, it's tricky to get around without official and easy documentation but there's definitely a lot of comments in the code to help with writing addons :)
Image
7 posts Page 1 of 1

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 1 guest

cron