Re: i18n

From: Adrian Wiesmann (awiesman..omap.org)
Date: Thu Jun 23 2005 - 16:06:30 EDT

  • Next message: Andrus Adamchik: "Re: i18n"

    > I would think it would be easier to have a separate table for each
    > Locale. ie, My_table, my_table_de, my_table_fr.

    I know I could get shot to mention this in some places (and it asks for a
    bit of a hack with Cayenne). But why not have one translation table and
    every other table using the translation like the example below.

    It needs a good setup and a rock solid access layer, but let me show this
    with an example:

    TableGoods
    ----------
    uuid=abcd;price=12£

    Translation
    -----------
    key=name;text=Tshirts;foreignkey=abcd
    key=description;text=Nice TShirts showing my face;foreignkey=abcd

    When trying to access the data you never call TableGoods directly but a
    view or some other mechanism which fills a virtual table:

    TranslatedGoods
    uuid=abcd;price=12£;name=Tshirts;description=Nice TShirts showing my face

    like that you never have to change the database when there is a new
    language and you have no problems with synching tables.

    Just some input, now I will hide :)
      
    Regards,
    Adrian



    This archive was generated by hypermail 2.0.0 : Thu Jun 23 2005 - 16:08:08 EDT