Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Localisations in EU Languages for Consent web view standard text. #19

Open
bluemachine opened this issue Jun 1, 2018 · 15 comments
Open

Comments

@bluemachine
Copy link

[When we show the consent form in English language to a non English Speaker, then they will not understand the language and end up giving us bad ratings. If you can share the strings for your standard form (attached here) that will help us (and many others) to provide a good user experience while taking user consent.]
ios_eu_consent_form

@codenia
Copy link

codenia commented Jun 1, 2018

Even if we had the localized strings, how can we localize the HTML file on iOS?

@codenia
Copy link

codenia commented Jun 1, 2018

Here is my German translation of the body tag for the HTML file. It would be nice if other native speakers of other languages also translate this area in the HTML file and publish it here?

German version:

<body>
  <div id="overlay" class="center hidden">
    <div id="content">
      <div id="content-box">
        <div class="app-title flex-center">
          <span id="title_app_name" class="app_name">App Name</span>
        </div>
        <div id="options">
          <div id="title_head">
            <div class="head_intro">Wir kümmern uns um Ihre Privatsphäre und Datensicherheit. Wir halten diese App kostenlos, indem wir Anzeigen schalten.</div>
            <div id="head_question">Dürfen unsere Partner Ihre Daten weiterhin nutzen, um Anzeigen für Sie maßzuschneidern?</div>
            <div class="head_detail">
              <span id="change_anytime_text1">Sie können Ihre Auswahl für <span class="app_name">App Name</span> jederzeit in den App-Einstellungen ändern.</span>
              <span id="head_detail_text">Unsere Partner sammeln Daten und verwenden eine eindeutige Kennung auf Ihrem Gerät, um Ihnen Anzeigen zu zeigen.
                <a href="#" onclick="showProviders();">Erfahren Sie, wie <span class="app_name">App Name</span> und unsere Partner Daten erheben und nutzen.</a>
              </span>
            </div>
          </div>
          <div id="buttons" data-sel="">
            <div id="btn0" class="button btn0 flex-center" onclick="actionClick(event, 'agree0');">
              <div class="button_title">Ja, weiterhin relevante Anzeigen sehen</div>
            </div>
            <div id="btn1" class="button btn1 flex-center" onclick="showUniqueIdInfo();">
              <div id="btn1_title" class="button_title">Nein, weniger relevante Anzeigen sehen</div>
            </div>
            <div id="btn2" class="button btn2 flex-center" onclick="actionClick(event, 'install');">
              <div class="button_title">Für die werbefreie Version bezahlen</div>
            </div>
          </div>
        </div>
        <div id="consent0" class="consent no-display">
          <div class="message"><span id="change_anytime_text2">Sie können Ihre Auswahl für <span class="app_name">App Name</span> jederzeit in den App-Einstellungen ändern. </span>Lernen Sie, wie unsere Partner Daten sammeln und nutzen:</div>
          <div id="providers">
          </div>
          <div class="how-use-data"><a href="#" onclick="showAppPrivacyPolicy(event)">Wie <span class="app_name">App Name</span> Ihre Daten verwendet</a></div>
          <div class="footer">
            <div class="actions">
              <div class="back btn" onclick="actionClick(event, 'back0')">Zurück</div>
            </div>
          </div>
        </div>
        <div id="consent1" class="consent no-display">
          <div class="message">Wir arbeiten mit Google zusammen und verwenden eine eindeutige Kennung auf Ihrem Gerät, um Ihre Wahl der Datennutzung zu respektieren. Sie können Ihre Auswahl für <span class="app_name">App Name</span> jederzeit in den App-Einstellungen ändern.</div>
          <div class="how-use-data"><a href="#" onclick="showAppPrivacyPolicy(event)">Wie <span class="app_name">App Name</span> Ihre Daten verwendet</a></div>
          <div class="footer">
            <div class="actions">
              <div id="back-btn" class="back btn" onclick="actionClick(event, 'back1')">Zurück</div>
              <div class="agree btn" onclick="actionClick(event, 'agree1')">Einverstanden</div>
            </div>
          </div>
        </div>
        <div id="consent2" class="consent no-display">
          <div class="head_intro">Wir kümmern uns um Ihre Privatsphäre und Datensicherheit. Wir halten diese App kostenlos, indem wir Anzeigen schalten.</div>
          <div class="message">Wir arbeiten mit Google zusammen und verwenden eine eindeutige Kennung auf Ihrem Gerät, um nicht personalisierte Anzeigen zu schalten.</div>
          <div class="how-use-data"><a href="#" onclick="showAppPrivacyPolicy(event)">Wie <span class="app_name">App Name</span> Ihre Daten verwendet</a></div>
          <div class="footer">
            <div class="actions">
              <div class="agree btn" onclick="actionClick(event, 'agree1')">Einverstanden</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>

@codenia
Copy link

codenia commented Jun 1, 2018

Russian version:

<body>
  <div id="overlay" class="center hidden">
    <div id="content">
      <div id="content-box">
        <div class="app-title flex-center">
          <span id="title_app_name" class="app_name">App Name</span>
        </div>
        <div id="options">
          <div id="title_head">
            <div class="head_intro">Мы заботимся о вашей конфиденциальности и безопасности данных. Мы оставляем это приложение бесплатным, показывая рекламу.</div>
            <div id="head_question">Могут ли наши партнеры продолжать использовать ваши данные, чтобы адаптировать объявления для вас?</div>
            <div class="head_detail">
                <span id="change_anytime_text1">Вы можете изменить свой выбор в любое время для <span class="app_name">App Name</span> в настройках приложения.</span>
                <span id="head_detail_text">Наши партнеры собирают данные и используют уникальный идентификатор на вашем устройстве для показа ваших объявлений.
                <a href="#" onclick="showProviders();">Узнайте, как <span class="app_name">App Name</span> и наши партнеры собирают и используют данные</a>
              </span>
            </div>
          </div>
          <div id="buttons" data-sel="">
            <div id="btn0" class="button btn0 flex-center" onclick="actionClick(event, 'agree0');">
              <div class="button_title">Да, продолжить показ релевантных объявлений</div>
            </div>
            <div id="btn1" class="button btn1 flex-center" onclick="showUniqueIdInfo();">
              <div id="btn1_title" class="button_title">Нет, показывать меньше релевантные объявления</div>
            </div>
            <div id="btn2" class="button btn2 flex-center" onclick="actionClick(event, 'install');">
              <div class="button_title">Оплатить версию без рекламы</div>
            </div>
          </div>
        </div>
        <div id="consent0" class="consent no-display">
          <div class="message"><span id="change_anytime_text2">Вы можете изменить свой выбор в любое время для <span class="app_name">App Name</span> в настройках приложения.</span>Узнайте, как наши партнеры собирают и используют данные:</div>
          <div id="providers">
          </div>
          <div class="how-use-data"><a href="#" onclick="showAppPrivacyPolicy(event)">Как <span class="app_name">App Name</span> использует ваши данные</a></div>
          <div class="footer">
            <div class="actions">
              <div class="back btn" onclick="actionClick(event, 'back0')">Назад</div>
            </div>
          </div>
        </div>
        <div id="consent1" class="consent no-display">
            <div class="message">Мы работаем с Google и используем уникальный идентификатор на вашем устройстве, чтобы соблюдать ваш выбор использования данных. Вы можете изменить свой выбор в любое время для <span class="app_name">App Name</span> в настройках приложения.</div>
          <div class="how-use-data"><a href="#" onclick="showAppPrivacyPolicy(event)">Как <span class="app_name">App Name</span> использует ваши данные</a></div>
          <div class="footer">
            <div class="actions">
              <div id="back-btn" class="back btn" onclick="actionClick(event, 'back1')">Назад</div>
              <div class="agree btn" onclick="actionClick(event, 'agree1')">Согласен</div>
            </div>
          </div>
        </div>
        <div id="consent2" class="consent no-display">
          <div class="head_intro">Мы заботимся о вашей конфиденциальности и безопасности данных. Мы оставляем это приложение бесплатным, показывая рекламу.</div>
          <div class="message">Мы работаем с Google и используем уникальный идентификатор на вашем устройстве для показа не персонализированных объявлений.</div>
          <div class="how-use-data"><a href="#" onclick="showAppPrivacyPolicy(event)">Как <span class="app_name">App Name</span> использует ваши данные</a></div>
          <div class="footer">
            <div class="actions">
              <div class="agree btn" onclick="actionClick(event, 'agree1')">Согласен</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>

@bluemachine
Copy link
Author

Thanks @codenia for sharing the German and Russian versions. I'll be using with the native UI View showing same text as shown in the Web View banner. I'm not sure how to a different html for each language.

@codenia
Copy link

codenia commented Jun 1, 2018

For iOS I use the original PACView from this Google Mobile Ads Consent SDK. I did the following to localize it.

I copied the file consentform.html for each language and renamed it:

bildschirmfoto 2018-06-01 um 19 48 00

Then I created a new strings file in my project and named it consentform.strings. Then I activated localization of the file for each language:

bildschirmfoto 2018-06-01 um 19 48 50

This is entered in the english consentform.strings file:

/* Filename for the PersonalizedAdConsent SDK */
"consentform" = "consentform";

This is entered in the german consentform.strings file:

/* Filename for the PersonalizedAdConsent SDK */
"consentform" = "consentform_de";

And in the other files the other language code.

In the file PACView.m I modified this method like this:

/// Loads the consent form HTML into the web view.
- (void)loadWebView {
  NSBundle *bundle = [NSBundle bundleForClass:[self class]];
  NSBundle *resourceBundle = [self resourceBundleForBundle:bundle];
  if (!resourceBundle) {
    resourceBundle = [self resourceBundleForBundle:[NSBundle mainBundle]];
  }
  if (!resourceBundle) {
    NSError *error =
        PACErrorWithDescription(@"Resource bundle not found. Ensure the resource bundle is "
                                @"packaged with your application or framework bundle.");
    [self loadCompletedWithError:error];
    return;
  }
    
  // Code change by codenia
  NSURL *URL = [resourceBundle URLForResource:NSLocalizedStringFromTable(@"consentform", @"consentform", nil) withExtension:@"html"];
  NSURLRequest *URLRequest = [[NSURLRequest alloc] initWithURL:URL];
  [_webView loadRequest:URLRequest];
}

It is not a very good solution, because with an update of the SDK I have to adjust this method again manually. But I did not come up with a better solution.

I will deal with Android at the end of next week. Let's see how I do it there.

I'm grateful to Google for initializing this SDK.

@bluemachine
Copy link
Author

This is great!! Thanks a lot @codenia It will be helpful if you could share the translation strings for European languages French, Italian, Spanish, Dutch and Portuguese. Also Japanese, Korean and Simplified Chinese.

@codenia
Copy link

codenia commented Jun 1, 2018

I'm sorry, but I don't have translations for these languages yet. It would be very nice if people from these countries would translate the texts here. Otherwise I would have to order it from the translators and it would take a long time.

@codenia
Copy link

codenia commented Jun 2, 2018

Today I ordered the translation for the other eight languages. I'll post all files here by the end of next week.

@bluemachine
Copy link
Author

@codenia just found that Google's Privacy policies are only in these languages. Seems your screen will be more sophisticated than Google's :-).

screen shot 2018-06-02 at 07 43 34

@codenia
Copy link

codenia commented Jun 8, 2018

Here are as promised all 10 languages I have. The texts were translated by a translation team. I cannot guarantee the correctness of the translation.

consentform.zip

Chinese (Simplified)
Dutch
French (France)
German
Italian
Japanese
Korean
Russian
Portuguese (Portugal)
Spanish (Spain)

@bluemachine
Copy link
Author

This is great @codenia! Thanks a ton for improving the customer experience for other app along with yours.

@dzungpv
Copy link

dzungpv commented Jun 12, 2018

@codenia Thank your for the translation. This can use with Android SDK?

@codenia
Copy link

codenia commented Jun 12, 2018

Yes, you can use these html files also for android.

@dzungpv
Copy link

dzungpv commented Jun 12, 2018

@codenia Check my solution for Android here: googleads/googleads-consent-sdk-android#14

@rivington101
Copy link

Thanks for this thread @codenia.
I have come to this rather late and I am stuck implementing it.
I think the framework file structure has changed since you posted this. See below.
Does the PACView.m code need to change?
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants