title: How can I change language programmatically for fragments?
body: <p>I change locale this way. </p>
  
  <pre><code>override fun attachBaseContext(base: Context) {
          super.attachBaseContext(updateResources(base, sessionInteractor.locale))
  }
  
  fun updateResources(context: Context, locale: Locale): Context {
  
          Locale.setDefault(locale)
  
          val resources = context.resources
          val config = Configuration(resources.configuration)
  
          config.setLocale(locale)
          return context.createConfigurationContext(config)
  }
  </code></pre>
  
  <p>It's perfect works for activities but doesn't work for fragments.</p>