• Extensions
  • Linguist, customize translations with ease

Just released an update to Linguist UI (0.2.0). It now looks a lot more like other translation tools, and it should be a lot easier to search, browse and find the strings you want to replace !

No actual new "features" in this release, it still works exactly the same in the background !

You should be able to upgrade with

composer require flagrow/linguist
php flarum cache:clear

This new UI should solve some usability issues that were reported previously. Let me know what you think !

16 days later
5 months later

Now compatible with beta 8, for your greatest pleasure 👌

With @Toby having just added translations caching in core, you can already expect Linguist to break again whenever that feature is released in a next Flarum upgrade. But I suppose it won't be before beta 9, so I have some time to find a way to make it work...

    8 days later

    Hello, it's possible to export translation?

    that's not a feature that's built-in at this time.

    But you can easily use a database tool like phpMyAdmin to export the content of the flagrow_linguist_strings table and import them back on another install.

    a month later

    manny For now there's no plan to allow translating anything that's not going through Flarum's translator. That could really hurt compatibility with other extensions that use emails as well.

    Can't you use Pretty Mail or Pretty Mail + Linguist to achieve it though ?

      7 days later
      15 days later

      szrcmk it looks like Bazaar translations aren't loaded inside Flarum to begin with. What language pack are you using ? Did Bazaar text appear prior to using Linguist ?

      Did you try clearing the cache manually, via the admin or the command line ?

      Could you post the output of php flarum info ? It would give us flarum version, linguist version and which language pack(s) you have.

      What you're doing there in Linguist shouldn't make any difference, English should be used by default if Bazaar isn't translated by your language pack and English text contains the same string you're trying to set.

      5 months later

      @clarkwinkelmann

      How about adding "default fallback". So as long as the field is empty, it'll fall back to english, which everyone supports atm.

      It's a huge headache with extentions that isn't multilingual.

        ThomasBang Flarum should fallback to english automatically, but doesn't do so in the front-end as reported in this issue flarum/core1774

        And it looks to me that fixing the issue in Flarum directly will require less work than trying to implement a fix via an extension like Linguist. The underlying problem in based on the fact that if you cross-reference translations that exist in English versus those that don't exist in English to find the ones to override, it goes over the standard memory limit and crashes PHP. If someone got any idea on a memory-frienly approach, feel free to add your thoughts to the Flarum issue linked above.

        If you really need to fix some extensions, you could filter translations by extensions, then copy every English translation you need manually to "default translation".

        16 days later

        Public service anouncement: as expected (since the beta 8 release already and announced above) this extension is affected by a breaking change in beta 9 and will require some changes to be compatible.

        I recommend not installing the current version at all on beta 9 as it might mess up with the new translation logic.

        You can follow the GitHub issue here: flagrow/linguist8

        I'll try to take a look in the next few weeks. You may contact me directly if you'd like to sponsor the update to get it sooner 😉

        Or if someone wants to have a try at a PR let me know so we don't start two different updates.

        I'm adding the incompatible tag here in the meantime.

          10 days later

          And if the opportunity to somehow pull out my translation, while you solve this problem?

            Alkir you can extract your translations from the flagrow_linguist_strings database. Then you'll need to write a script or do some manual editing to put it into a Yaml file for a translation.

            It's possible others have been able to continue using Linuist on beta9, by manually clearing the cache after every change. But I'm not 100% sure because nobody reported here.

              clarkwinkelmann

              I just did a clean install, I installed the Flagrow Linguist, I activated it, then imporeti the old table to the new database.

              worked perfectly on beta9

              I used laragon to import with 100% certainty

              8 days later

              Now that this extension is incompatible, what's the recommended way to change, for example, the text in the search bar, if any?

                nxta it appears to actually work with beta 9, there are just some issues with translations caching that require manual cache clearing.

                The other solutions involve creating a language pack, or loading a custom translation file from extend.php.