open-index/open-npm huggingface dataset:
npm package: @qonsoll/translation
Description: props:
Latest version: 0.5.9

# Firebase RealTime Database Translation

props:

- children,
- defaultApp
- defaultLanguage = 'en'
- onWrite
- onRead
- storage = window?.localStorage
- languages = [{ name: 'English', shortCode: 'en' }]
- initialState = {}
- useHashes = false
- saveNewAutomatically = false
- isLive = false


Example:

```js
const TranslationProvider = (props) => {
  const { children, currentApp = DEFAULT_APP } = props

  // [HELPER_FUNCTIONS]
  const onWrite = useCallback(
    ({ ref, value }) => database().ref(ref).update(value),
    []
  )
  const onRead = useCallback(
    ({ ref: path, setTranslations, options }) =>
      database()
        .ref(path)
        .on(
          'value',
          (snapshot) => setTranslations(snapshot?.val() || {}),
          options
        ),
    []
  )

  return (
    <Provider
      storage={AsyncStorage}
      db={database()}
      onWrite={onWrite}
      useHashes
      onRead={onRead}
      saveNewAutomatically
      languages={LANGUAGES}
      defaultLanguage={DEFAULT_LANGUAGE}
      currentApp={currentApp}>
      <TranslationContext.Consumer>
        {({ loaded }) =>
          loaded ? children : <ScreenLoading text="Translation is loading" />
        }
      </TranslationContext.Consumer>
    </Provider>
  )
}

```
    
   
   Context value:

  - setCurrentLanguage
  - language
  - translations
  - saveTranslationForLanguage = ({ textLabel, shortCode, refEnding, appName }) => Promise
  - loading
  - loaded
  - languages
  - translationsRDBRef: `translations/${currentApp}/${language}`
  - t
npm package: @qonto/embed-sdk
Description: Library to embed Qonto features in your application
Latest version: 0.64.3

# qonto-embed-sdk

Use Qonto Embed in your website with a high level abstraction that will make your integration easy and fast.

## Getting started

1. Install the SDK with your package manager of choice:

```bash
npm install @qonto/embed-sdk
```

or

```bash
pnpm install @qonto/embed-sdk
```

or

```bash
yarn add @qonto/embed-sdk
```

2. Then, initialize the SDK in your code:

```ts
import { initialize } from '@qonto/embed-sdk/common';

const accessToken =
  'An access token you have previously generated from your app';
initialize({ accessToken });
```

Read more about how your users are onboarded and an access token is generated for them in
[the docs](https://docs.qonto.com/api-reference/onboarding-api/flows/existing-company#the-onboarding-flow).

3. From that moment on, you can access the different namespaces of the SDK:

```ts
import { cards } from '@qonto/embed-sdk/cards';

const newCard = cards.orderCard(cardConfig);
```

## API stability

We are in the early stages of the SDK implementation. While we will strongly attempt to avoid
breaking changes, we may need to make some in the future. Note that while the SDK is in the v0.x
stage, breaking changes might happen.
Once we reach v1.0.0, we will follow [semantic versioning](https://semver.org/) strictly.

## Programmatic features

This SDK exposes a set of programmatic features that you can use to interact with Qonto services. These features are
grouped into namespaces under `src` (cards, sepa-transfers, beneficiaries...) and they mainly export functions that can
be called by SDK users. Most of those functions are wrappers around Qonto's third party REST API, but some have more
complex logic, like opening iframes to perform sensitive actions.

## UI Elements

The SDK exposes a set of UI Elements that can be embedded in partners' web applications. These elements are standard Web
Components that can be used in any front-end framework or vanilla JavaScript app. The implementation is done using Lit,
and the components are available under the `ui` namespace under `src`.

## Next steps

Now that you have the SDK installed and initialized, you can start using it. Check
[the documentation](https://docs.qonto.com/home/use-cases/Qonto-embed) for each namespace to get up to speed with the
different features available.