translation tables question -

A place for users and developers of the Xataface to discuss and receive support.

translation tables question -

Postby jonbfl » Mon Aug 22, 2011 2:37 pm

I have been reading through this article in the wiki: (actually the whole section)

http://xataface.com/documentation/tutor ... anslations

I'm a bit lost on one aspect of the example: (and this make be an artifact of the state of Xataface when the example was written)

I see we have three tables; A 'master' table with a full set of fields, and two 'translation' tables with equal subsets of the 'master'. I'm all good up to this point actually. I can grok how the translation classes need to be able to home in on their unique variant of the text(s) colums/fields. Its quite close to my original design for my datasets (I ended every column-name with the ISO code or ML for MultiLingual). I'm going to push forward to see how it works, but I'm quite curious if the master/default table in a multi-lingual environment will effectively be 'empty' other than the index record(s). BUT, in the example, its implied the table WILL contain data (all the NOT NULLS). In fact, as I read it - in the example, we would presumably have duplicated data for most columns between the default table and the '_en' table. Or did I totally miss something there?? LOL - I didn't even use 'normalize'.

Is this simply because when the example was written there were only two translations, and the example needed a second language table type to be relevant?

If the prior assertion about duplicate data is true, will it (the default table) also be skipped in search by default (as presumably the default search will target the 'current' language???

I'm quite curious, as my default language on the finished applications probably won't be English, but more likely Spanish (Castilian)

Thanks very much.
8)
jonbfl
 
Posts: 66
Joined: Thu Jul 28, 2011 8:20 pm

Re: translation tables question -

Postby shannah » Mon Aug 22, 2011 2:53 pm

The master table will contain data for the default language. (In all of the examples this is english). The translation table for the default language is just a dummy table for completeness and symmetry. It won't be used very much.

Note also that you wouldn't include untranslatable fields in either of the translation tables. E.g. Things like birth date, phone number, Age, category id, likely would only appear in the master table as they don't need to be translated.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: translation tables question -

Postby jonbfl » Tue Aug 23, 2011 11:50 am

It won't be used very much.


I read that very carefully, and to me, it begs another question --

Will it be necessary at all? On the that you name the default language in the conf.ini, and you have a total of four languages - is it the case that Xataface will work correctly with the master table containing the indices and non-translatable data PLUS the native tongue data for the translated fields/columns, and then the three 'translation' tables for the text data.

or is it best to build 4 translation tables and treat the master table's text data as 'dummy records' of some sort???

Will it make a difference later for things like search, or classes that may be built later??

Thanks again
:)
jonbfl
 
Posts: 66
Joined: Thu Jul 28, 2011 8:20 pm

Re: translation tables question -

Postby shannah » Tue Aug 23, 2011 12:30 pm

Currently it actually isn't used at all to store data. It is just used for consistency as Xataface uses the existence of translation tables to know which languages can be translated for a particular table.

It does need to be there though. (When this concept was first developed we actually did use the translation table of the default language, but then discovered that it made a lot more sense to just store the default content in the default table... so you could say that the default language translation table is just there for historical purposes).

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: translation tables question -

Postby jonbfl » Tue Aug 23, 2011 1:14 pm

OK, thanks for the clarification.

8)
jonbfl
 
Posts: 66
Joined: Thu Jul 28, 2011 8:20 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 25 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved