When dealing with multiple languages, I seperate the language specific content into a seperate table. So Product (1:m) ProductDetails
e.g
Table Product
- ProductId (PK)
- Color (FK)
etc
Table ProductDetails
- ProductId (PK)
- LanguageCode (PK)
- Description
It really just an entity split across two tables but LLBLGEN doesn't support this, so you would need to create a ProductManager (or similar) object to encapsulate the insert, updates, deletes that take place on the underlying Entity Objects.
In order to select the information out you can use a query with the following structure, which basically says, "if its available in the target language return that, else return the default language"
Note: I use stored procs because I'd already written them but in theory you should be able to LLBLGEN it.
CREATE PROCEDURE [dbo].[SelectProduct]
@Target_Language char(2),
@Default_Language char(2),
@Product_Key int
AS
BEGIN
SELECT
P.*, PD.*
FROM
Product P
INNER JOIN
ProductDetails PD
ON
P.Product_Key = PD.ProductDetails_Key
AND (PD.ProductDetails_LanguageCode = @Target_Language OR PD.ProductDetails_LanguageCode = @Default_Language)
AND P.Product_key = @Product_Key
LEFT JOIN
ProductDetails PD2
ON
P.Product_Key = PD2.ProductDetails_Key
AND PD2.ProductDetails_LanguageCode = @Target_Language
WHERE
PD2.ProductDetails_LanguageCode IS NULL OR PD.ProductDetails_LanguageCode = @Target_Language
END
Hope it helps and if you do LLBLGEN it, it would be great if you could post it
Cheers,
Pete