labadserver / Adplayer

Adplayer reference implementation
https://github.com/labadserver/Adplayer/wiki
Other
28 stars 11 forks source link

Internationalization #100

Closed olwa closed 12 years ago

olwa commented 12 years ago

I think we have to dicuss on Wednesday, how we handle the internationalization of the AdPlayer.

Also see question in german forum: http://rolloutadplayer.de/wordpress/gforums/topic/internationalisierung

bmonaumann commented 12 years ago

I would suggest a simple object within the AdPlayer namespace which holds a method to detect the language code like en-US or de-DE. We need to have this two-item-version, because by IAB Europe OBA Framework and EASA BPR in Europe we need to differ Dutch (nl-NL) and Flemish (nl-BE). There is also a default language (en-GB) for those circumstances when the language detection fails.

Additionally this object should provide a simple method to get the default texts considering the browser language.

dhellmuth commented 12 years ago

Lab Adplayer Meeting 13.06.2012:

olwa commented 12 years ago

Technichal Specifications for IAB EU OBA:

"For the purposes of this implementation the primary method to determine User Language is based on the value of browser’s language attribute."

"If the value of browser’s language attribute cannot be read or has a value outside of the expected ones, the Ad Marker should behave as if the language was “en” (other defaults may apply in specific markets). Also, for improved user experience, there should be an intuitive language-­‐switching mechanism on the landing page (OBA User Choice Site) or on the Third Party interstitial page (if present).

Third Parties delivering the Ad Marker may choose to use alternative methods for determining User Language, should they prefer to do so, such as GeoIP data, ad language, site language, or manually when trafficking the campaign. For consistency and overall user experience, it is important that Third Parties choosing to use alternative methods make sure that the script displaying the Ad Marker behaves correctly (i.e. if multiple parties serve the Ad Marker, only the upper-­‐most Ad Marker expands in the rolled-­‐out state)."

http://rolloutadplayer.de/wordpress/wp-content/uploads/Technical-Specifications-for-IAB-EU-OBA-FW-v1.pdf

dhellmuth commented 12 years ago

there are several request from other european countries to use the adplayer (like NL, scandinavian countries, ...). we should discuss a solution and proof, if it can be realized in v2.0

andreasberenz commented 12 years ago

Custom Texts have always to be translated by the publisher to the user's language. It is not possible for the AdPlayer to translate custom headers, footers, linkTexts.

Translated default texts would blow up the adplayer.js file or a separate language-file must be hosted and loaded externally multiple times through iframes, custom headers and footers must be collected, too.

janwinkler commented 12 years ago

translated texts are only needed when the privacy info is shown, so they can be loaded after the ad is ready. my favourite is to simply add a javascript languagefile which is loaded async:

  1. load ad + oba icon. the oba js will already include the translations for "Datenschutzinfo" to display the correct mouseover-text
  2. load a translation file asyn like translate-de_DE.js, translate_en_GB.js and so on depending on user language
  3. if oba popup is opened, use the translated texts instead of default texts

this way also custom texts from the publisher can be loaded for each language by defining a function/variable to load anonther translation-file with the publsihers translations.

olwa commented 12 years ago

We (@dhellmuth, T. Schauf and me) decided today that I add a internationalisation support these days.

Its on @janwinkler s basis with the difference, that we hardcode the header and footer-text in german and english.

When someone clicks the adplayer-button, and his browser language is not german or english, we load a translation.js which includes "all" translations. If the file can't be loaded in a time x, we fall back to english.

The supported languages depends on the translations, we get from supporter. if anyone can submit one translation from the header and footer text, he is welcome to send the translations to me.

dhellmuth commented 12 years ago

like confirmed yesterday, Thomas will provide the english texts. I asked our contact from IAB NL and a scandinavian contact for the texts in dutch, danish, swedish and finish. I'll provide the texts to the group immediately after getting them.

olwa commented 12 years ago

After tests with loading the translation file on button click I decided to load the translation file at the point where the button will be generated the first time and the language is not german or english.

Reason: On slow internet connections there are cases where the language file is not loaded early enough. Now we have the puffer between button generation and user click who should be enough for load the file.

I will commit the changes if i get the first translations from @dhellmuth and Thomas Schauf.

dhellmuth commented 12 years ago

@olwa I don't expect the dutch and scandinavian texts to come this week, because the contacts didn't respond yet. I asked Thomas to provide the english texts asap!

olwa commented 12 years ago

Implemented in V 2.0