Internationalising doesn't work in IE8

Internationalising doesn't work in IE8

tantebootsytantebootsy Posts: 3Questions: 0Answers: 0
edited September 2012 in General
Hi @all,

although we set lang="de" within the html-tag IE8 doesn't switch to german regarding the labels. It's showing everything in english. I wonder how datatables determines the language to be shown. Does it check any browser-settings and doesn't take the "lang"-attribute into account? Does anybody know how this issue can be solved?

Any help would be greatly appreciated :)

Thx,
Michael

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    > I wonder how datatables determines the language to be shown

    It doesn't - you need to tell it what to show using the oLanguage options: http://datatables.net/usage/i18n

    Allan
  • tantebootsytantebootsy Posts: 3Questions: 0Answers: 0
    Hi Allan,

    thx for your response.

    I know these options and all browsers show the labels with the correct language (German) – except IE8 which is showing the labels with the default language I guess (English).

    So I didn't mean I wondered how datatables determines _which_ labels to show but I wonder how it determines _in which language_ the labels shall be shown.

    Michael
  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    As I say, it doesn't :-). You need to explicitly tell it what strings to use (it isn't really bothered about the language - its just displaying strings). So if you want it to display German strings, you need to feed it German strings.

    Allan
  • tantebootsytantebootsy Posts: 3Questions: 0Answers: 0
    Sure, but datatables somehow detects the language and decides which language-strings to show. Otherwise the feature "internationalisation" wouldn't make sense I think. ;) And as I said the strings are shown correctly in FF, Safari etc. but not in IE8. So there must be some kind of detection ...
  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    > Sure, but datatables somehow detects the language and decides which language-strings to show.

    I promise it doesn't :-). Might be nice if it did - but it doesn't. There isn't a single line of code in DataTables which does that. For example - load this page: http://datatables.net/release-datatables/examples/basic_init/zero_config.html . Its all in English with the default strings.

    > Otherwise the feature "internationalisation" wouldn't make sense I think. ;)

    I see your point - yes. I've used "internationalisation" in the sense that all language strings can be altered (be it to a different English string, or a string which is not English).

    > And as I said the strings are shown correctly in FF, Safari etc. but not in IE8. So there must be some kind of detection ...

    Not in DataTables core. Possibly in a layer that you are using above DataTables... We'd need a link to be able to see what is actually happening.

    Allan
This discussion has been closed.