Specifying multiple cultures in the AdRotator control

430 Views Asked by At

I am using the adRotator control with my Windows Phone 7 app. They have a file that specifies what ads to play based on the country you are in:

<AdSettings> 
    <CultureDescriptors> 
        <AdCultureDescriptor CultureName="en-US"> 
            <Probabilities Probability="60" AdType="Smaato" /> 
            <Probabilities Probability="40" AdType="AdMob" /> 
        </AdCultureDescriptor> 
        <AdCultureDescriptor CultureName="en-GB"> 
            <Probabilities Probability="60" AdType="Smaato" /> 
            <Probabilities Probability="40" AdType="AdMob" /> 
        </AdCultureDescriptor> 
        <AdCultureDescriptor CultureName="de-DE"> 
            <Probabilities Probability="80" AdType="Smaato" /> 
            <Probabilities Probability="20" AdType="AdMob" /> 
        </AdCultureDescriptor> 
    </CultureDescriptors> 
</AdSettings>

As you can see I am specifying 3 different cultures (en-US, en-GB and de-DE). However, 2 of them have settings that are exactly the same (en-US, en-GB).

Is there a way to specify multiple cultures on the same node? I tried the following, but doesn't seem to work.

<AdSettings> 
    <CultureDescriptors> 
        <AdCultureDescriptor CultureName="en-US, en-GB, da-DK"> 
            <Probabilities Probability="60" AdType="Smaato" /> 
3

There are 3 best solutions below

2
AngryHacker On BEST ANSWER

The answer is no. I've downloaded the code and looked at it - so it's a single culture per node.

0
InquisitorJax On

You can add a CultureDescriptor with the name of default. If you want common settings, then just add specific cultures that differ from the default.

0
Mubashar On

WP Unified Ad control supports multiple countries in one node like following and also it provides multiple events which can help to get more controls on ads and ad space.

<AdCountryDescriptor Country="US, GB" InitialAdProvider="AdMob">
      <Probability Value="70" AdProvider="PubCenter" />
      <Probability Value="10" AdProvider="AdDuplex" />
      <Probability Value="10" AdProvider="MobFox" />
      <Probability Value="10" AdProvider="AdMob" />
      <Probability Value="20" AdProvider="NoAd" />
    </AdCountryDescriptor>
    <AdCountryDescriptor InitialAdProvider="PubCenter">
      <Probability Value="20" AdProvider="PubCenter" />
      <Probability Value="20" AdProvider="AdDuplex" />
      <Probability Value="20" AdProvider="MobFox" />
      <Probability Value="20" AdProvider="AdMob" />
      <Probability Value="20" AdProvider="NoAd" />
    </AdCountryDescriptor>