Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
Consider couch in multiple languages.
We have an index.php in the root and 2 folders with different languages i.e. EN and FR
The index.php in the root redirects towards the default folder.
What would be the best way to duplicate the values from one language to the other?
This, because then, translation can begin in the cms itself and a lot is done already (i.e. images, links,...)

Is there some kind of insight how the database structure is build towards all this?

We tried some SQL queries to duplicate and adapt some fields and most of it works.
However, now we see while we want to save new entries, that other templates fail to save upon entries. We might made a mistake somewhere.

It's kind of hard to tell from looking at the tables and columns without additional background info as we might have it wrong at some point. Anyone had similar issues or some info to share upon this?

One hard nut to crack is table: couch_data_numeric where page_id doesn't seem to correspond to the id of couch_pages. Even while page_id most commonly does so for other tables. We're a bit confused...
It seems like if we change something in table: couch_data_text, we have all the cloneable templates and values acting ok, however then the non-cloneable seem to behave bad in a way that they can't be saved.

If we change it back again, it's the other way around. In general the "global" variables in the clonable template like: "title" seem to behave ok even when updated in couchcms but the "self-made" variables can't be used as data input isn't saved. Saving Self-made variables results in empty fields.

Any ideas?
Divian, normally you never have to make changes to the database directly.
I think there should be a way of doing what you wish using Couch tags.

Problem is, I couldn't understand the problem completely.
May I request you to please skip whatever solution you have devised and explain in more detail only the exact problem?

Please give some sample data and also how the final output should ideally appear.

Thanks.
Hi KK,

I'll try to explain...

client request
A client wanted a website in 2 languages.
We built it in the default (NL) language and had a second language on hold (FR). The FR language was already initialized in couhcms, but without client data.

setup
We used the technique as stated in the forum while using 1 index.php in the root of the webhost and per language a folder to which is linked. In this case we are able to expand with additional languages if wanted (copying a language folder and renaming the template names with a suffix to show up in couchcms).

site structure (FTP root):
index.php (redirect immediately to default NL language via NL/index.php)
NL (folder)
- index.php
- ...
FR (folder)
- index.php
- ...
...

couchcms could look like:
about_NL (non clonable)
about_FR (non clonable)
projects_NL (clonable)
projects_FR (clonable)
...

activating more languages
Fast forward. The client wants a second language active and wants ALL his data that was already created from the default language (NL), in a second language (FR). Translation will start directly in couchcms once data is duplicated from NL to FR. There is lots of data that will remain (like urls, images,...) and the client will benefit from fewer "clicking" and switching between screens.

in general we can ask...
How can we duplicate all the data from one language into another in a way the new language can be easily altered and the client has a second language for his website with all placeholder data from the default language?

What we already tried
We tried doing this via SQL in the database, looking for the needed id's in each language and duplicating data as we seemed needed. We thought "page_id" would link us rather easily through the process but we were mistaken. Knowing how the database is dynamically changed each time, might help. :?

as a sidenote
Not expecting but it would have been awesome if there was some kind of translation feature that we could export the necesseray fields to be translated for i.e. altering in MS Excel, to be finally reimported once the "translation service" was done, resulting in another language update for the site.


Thanks in advance!
4 posts Page 1 of 1
cron