Git Product home page Git Product logo

Comments (7)

adrai avatar adrai commented on July 28, 2024 3

@pedrodurek interesting... also others are looking for it 😉

from i18next-vue.

adrai avatar adrai commented on July 28, 2024 1

i18next/i18next#1884

from i18next-vue.

kkuegler avatar kkuegler commented on July 28, 2024

The type definitions used by react-i18next are quite lengthy and complex, and that's not something I'd like to duplicate and maintain separately for i18next-vue.

There seem to be efforts of extracting the types to the core library, see i18next/i18next#1504.
When that works out, I think using (and possibly slightly augmenting) the types sounds like a good idea.

from i18next-vue.

kendallroth avatar kendallroth commented on July 28, 2024

It looks like the linked issue has been merged; is this something that could be re-evaluated at this point?

from i18next-vue.

kkuegler avatar kkuegler commented on July 28, 2024

I look into this in the near future and see how to integrate the types best.

We'll probably not publish a new version with this right away, but wait a bit for the "dust to settle". As @adrai's linked ticket shows, there are still quite some type-related changes and fixes going on in i18next itself.

from i18next-vue.

kkuegler avatar kkuegler commented on July 28, 2024

We plan to include this in i18next-vue v3. In fact, you can try it in the alpha version already: https://github.com/i18next/i18next-vue/releases/tag/v3.0.0-alpha.0

The syntax is like in your example

const { t } = useTranslation('settings');

This should work as good as the types for i18next.getFixedT().

See #16 for other changes planned for version 3.

from i18next-vue.

kkuegler avatar kkuegler commented on July 28, 2024

As outlined above, this is implemented in v3.

from i18next-vue.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.