Skip to content

Feature request: Fluent implementation for Java and other JVM languages #158

Closed

Description

@ExE-Boss

Given that the Android frontend is implemented in Java, this will probably be necessary in order to use Fluent on Android.

See also #93 (comment):

It would also be useful to have this implemented in Java as well.

We talked a bit about this recently, and our initial take was to consider Kotlin rather than Java. Do you have an opinion on Kotlin as a target?

Well, Kotlin runs on the JVM, so it should be rather compatible with Java, although it might possibly need a few helper classes, similar to when dealing with Java ⇔ Scala calls. Granted, the need for those has significantly lessened since Java 8 and Scala 2.12.

Activity

  1. stasm commented on Jul 27, 2018

    @stasm
    Contributor

    We already have a WIP implementation of Fluent in https://github.com/projectfluent/fluent-rs. Do you mean that we could use FFI to use it from Android's Java code?

  2. ExE-Boss commented on Jul 27, 2018

    @ExE-Boss
    Author

    I would personally prefer if it was a full implementation entirely in Java, but official JNI bindings for fluent‑rs would work too (albeit a bit more limited, as the Rust binaries would have to be compiled for all target platforms, whereas a Java only implementation would work on any platform that has a JVM without needing recompilation).

  3. stasm commented on Aug 3, 2018

    @stasm
    Contributor

    That's good to know, thanks. JVM is not among our top-tier targets and we don't have enough people on the team to commit to a Java- or Kotlin-based implementation right now. If you're interested in working on one, I'll be more than happy to try to promote it among friends of Fluent.

    OTOH, fluent-rs is becoming more and more important for us. It might even become the main implementation of Fluent used in Gecko in the not-so-distant future. If the limitations of the JNI are acceptable for your use-case, fluent-rs might be a good solution. @zbraniecki and @unclenachoduh will know more :)

    I'm going to close this issue for now. I added the Other Implementations section to the README to increase the visibility of this issue and to signal that we're interested in seeing a community-driven implementation in Java or Kotlin.

    Thanks!

  4. changed the title [-]Feature request: Rust implementation for Java and other JVM languages[/-] [+]Feature request: Fluent implementation for Java and other JVM languages[/+] on Aug 3, 2018
  5. JohnnyJayJay commented on Apr 17, 2020

    @JohnnyJayJay

    In case this is still relevant for any of the participants, here are WIP JNI bindings to fluent-rs. I will probably start publishing snapshots/alpha versions in the near future. I don't know anything about Android, but making this Android compatible should be fairly straight-forward. So if anyone wants to assist there, feel free to do so.

  6. NoahTheDuke commented on Jun 15, 2026

    @NoahTheDuke

    https://github.com/xyzsd/fluent is an active and fully-featured java implementation of the Fluent language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions