Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an option of using the <Interpolate /> with a raw HTML #195

Merged
merged 3 commits into from
Aug 10, 2016
Merged

Added an option of using the <Interpolate /> with a raw HTML #195

merged 3 commits into from
Aug 10, 2016

Conversation

KostyaEsmukov
Copy link
Contributor

@KostyaEsmukov KostyaEsmukov commented Jul 31, 2016

Discussion in #189

Usage:

<Interpolate i18nKey='foo' useDangerouslySetInnerHTML={true} />

TODO:

@jamuhl
Copy link
Member

jamuhl commented Jul 31, 2016

did you init i18next before using it?

@KostyaEsmukov
Copy link
Contributor Author

In my own project? Yes I did, and it works as is. Why do you ask?

In case you need my config, here it is:

import * as i18n from 'i18next';
import * as LanguageDetector from 'i18next-browser-languagedetector';

import { ru } from './ru';

i18n
  .use(LanguageDetector)
  .init({
    fallbackLng: 'ru',
    whitelist: ['ru'],

    debug: ENV !== 'production',

    interpolation: {
      prefix: '__',
      suffix: '__',
      escapeValue: false  // not needed for react!!
    },
    joinArrays: '\n',
    resources: {
      ru: {
        translation: ru
      }
    }
  });

@jamuhl
Copy link
Member

jamuhl commented Jul 31, 2016

sorry landed on wrong PR...did reply on phone while on holiday network...seems mail reply mixed it up...will review PR after holiday.

@jamuhl jamuhl merged commit 3bf8209 into i18next:master Aug 10, 2016
@jamuhl
Copy link
Member

jamuhl commented Aug 10, 2016

published [email protected]. thanks for providing this.

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

Successfully merging this pull request may close these issues.

2 participants