Internacionalization

Discussion in 'ASP General' started by Paulo, Aug 21, 2008.

  1. Paulo

    Paulo Guest

    What is the best approach? Using DB wich stores the translation of the
    variable used on site for each language?

    LANGUAGE_CODE, VARIABLE, TRANSLATION
    1,'CustomerWord','Customer'
    2,'CustomerWord','Cliente' -> 'BR Portuguese

    Thanks
    Paulo, Aug 21, 2008
    #1
    1. Advertising

  2. Paulo

    Old Pedant Guest

    "Paulo" wrote:

    > What is the best approach? Using DB wich stores the translation of the
    > variable used on site for each language?
    >
    > LANGUAGE_CODE, VARIABLE, TRANSLATION
    > 1,'CustomerWord','Customer'
    > 2,'CustomerWord','Cliente' -> 'BR Portuguese


    That will work, but it will be very, very, very slow.

    Unless this is for a "toy" site that doesn't get very many hits, it would be
    a bad way to go.

    You need an all-in-memory solution.
    Old Pedant, Aug 22, 2008
    #2
    1. Advertising

  3. "Paulo" <> wrote in message
    news:...
    > What is the best approach? Using DB wich stores the translation of the
    > variable used on site for each language?
    >
    > LANGUAGE_CODE, VARIABLE, TRANSLATION
    > 1,'CustomerWord','Customer'
    > 2,'CustomerWord','Cliente' -> 'BR Portuguese
    >


    Learn ASP.NET which has built-in support for this sort of thing.

    However the problem with globalisation is that there is more to it than
    translation.

    Character encoding is important, make sure everthing on the site is saved as
    UTF-8, make sure the each page specifies 65001 as its codepage and make sure
    every page sets the reponse CharSet to UTF-8. (These are defaults in
    ASP.NET).

    Layout needs to be considered especially if this is an application. A small
    label in English may be twice as long in German so your form layouts must
    take this into account. One way to mitigate this would be to place field
    labels above the field input and to use some generous spacing.

    Another option worth considering (for the ASP scenario) would be to extract
    all logic into javascript files and ASP include files and make extensive use
    of CSS. Thereby reducing the HTML to a definition of content. Bearing in
    mind that a chunk of HTML can be enclosed in a Function also helps with this
    especially for the typical repeated set of TRs. Place this first set of ASP
    in a folder indicating its language (e.g. http://yoursite/en/ ). With that
    done take that folder and have it translated into an appropriate adjacent
    folder.

    This approach has the advantage of perfoming better and has the flexibility
    to allow different layouts per language.

    The down side is that changes to HTML require multiple files to be changed.
    However that would be a 'handle turning exercise' and maintains the
    flexibility to deal with any layout issues specific to a language.

    BTW another tip with this approach is to ensure that along with a common
    ..css reference the language specific pages reference a css from their
    language specific folder and that this link is found after the common
    reference in document order. Do this even if you can't think of anything
    that would be in the language specific css. A language specific css can
    then override the common when necessary.


    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Aug 22, 2008
    #3
  4. Paulo

    Paulo Guest

    "Old Pedant" <> escreveu na mensagem
    news:...
    >
    >
    > "Paulo" wrote:
    >
    >> What is the best approach? Using DB wich stores the translation of the
    >> variable used on site for each language?
    >>
    >> LANGUAGE_CODE, VARIABLE, TRANSLATION
    >> 1,'CustomerWord','Customer'
    >> 2,'CustomerWord','Cliente' -> 'BR Portuguese

    >
    > That will work, but it will be very, very, very slow.
    >
    > Unless this is for a "toy" site that doesn't get very many hits, it would
    > be
    > a bad way to go.
    >
    > You need an all-in-memory solution.


    What is a "all-in-memory solution"? Show me examples please!
    Paulo, Aug 22, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page