Hi Guys,
Am building a sample i18n app and have opted for the two table approach.
Table <EnittyName> contains language neutral informaton and Table <EntityName>Details containts language specific information. There is 1 ..* relationship between the <EntityName> Table and the <EntityName>Details Table. The PK of the <EntityName> Table is the <EntityName>.id and the PK of the <EntityName>Details Table is a compound key that includes the <EntityName>.id and the <EntityName>Details.language attribute. So I now have a situation where I can support as many languages as I like for each <EntityName> but only have a single instance of each language
For Example:
Table Hotel
{
Id int (PK)
Name nVarChar(255),
StarRating int,
CountryId int, (FK)
CityId int, (FK)
AreaId int (FK)
}
Table HotelDetails
{
Id int, (PK)
Language char(2), (PK)
Summary nVarChar(1500),
Description nText,
}
So my data might look like the following:
Table Hotel : 1 Row
id:1
Name: Hotel 1
StarRating 3
CountryId: 6
CityId: 14
AreaId: 6
Table HotelDetails : 2 Rows
Id: 1
Language: en
Summary: Hotel 1 Summary
Description: Hotel 1 Description
Id: 1
Language: fr
Summary: Sommaire De l'Hôtel 1
Description: Description De l'Hôtel 1
So now I am trying to figure out how to use the data that is in my tables using the code generated by LLBLGENPro. And I'm a bit baffled about where to start. i.e How would I go about selecting a single hotel with all of the required language specific information?
Hope this isn't too dumb a question.
Cheers,
Peter (aka lad4bear)