infinum / eightshift-gdpr

MIT License
0 stars 0 forks source link

Multilanguage #4

Open iruzevic opened 6 years ago

iruzevic commented 6 years ago

If you want to use plugin in multilanguage you must provide language code using filter.

example:

add_filter( 'esgdpr_set_locale', 'rsc_set_language_code' );

if ( ! function_exists( 'rsc_set_language_code' ) ) {
  /**
   * Set language code depending on plugin using
   *
   * @since 2.0.0
   */
  function rsc_set_language_code() {
    if ( defined( 'ICL_LANGUAGE_CODE' ) ) {
      return ICL_LANGUAGE_CODE;
    }
  }
}
dingo-d commented 6 years ago

I added translations using Loco translate, and the plugin strings didn't translate. Is this the cause?