I18n / Internationalization of your app - choose the right package

Hi all,

this days we are starting to code our new customer project. For that it is again the question … what internationalization package should we choose?

We have experiences with

https://atmospherejs.com/anti/i18n

and

https://atmospherejs.com/tap/i18n

but we also looking at this fancy stuff

https://atmospherejs.com/benoitt/intl


As far as I found on trello and some internet ressources, there is still no 100% plans from MDG how to support i18n within the next releases. In that case we are trying to focus on a suitable solution for the next ~12 months.

It would be great if someone will provide their experiences, especially if there are some with FormatJS

I am not sure, but it looks me that this might be the most sustained solution.

Thanks for your answers
Tom

2 Likes

I tried to rewrite my title and hope more people had some experiences with that stuff to discuss here :wink:

1 Like

Interested as well :slight_smile:

I’ll add my http://messageformat.meteor.com/. The current release (v0) is an old, frozen stable.

v2 is in the works, uses the yahoo intl stuff (including formatjs), does date/number/currency formatting, is super fast and brings a bunch of long requested features, but it will be a while until it’s finished since unfortunately I only get a chance to work on it once in a while. Some people are nevertheless using the super early pre-release though. If you’re considering it you can just take a look at some of the open issues.

Of course, no changes need to be made to your app code to upgrade (but v0 doesn’t do date/number/currency formatting).

1 Like

Hi Gadi ( @gadicc )
could you please in a short describe what is the main difference between yours and

https://atmospherejs.com/benoitt/intl

That would be great. I am currently thinking about a new package because I am looking for chain support in templates. And if I use yours or any other, I just could fill in the translate function but not more.

Please have a look at this suggestion:

Maybe we could discuss some share and codes.

Cheers
Tom

Hey @tomfreudenberg

I’m not so familiar with that package but I guess the big difference is that meteor-messageformat is a full translation platform. You can write your strings in-line in your templates, and mf extracts them for you, facilitates translation via a web UI, handles control flow to the client, etc.

[quote=“tomfreudenberg, post:5, topic:7232”]
This is what’s possible now {{ tpl.chain field1 tpl.trim tpl.toUpper tpl.join “,” tpl.trim field2 tpl.join “,” field }} or another example {{ tpl.trim field1 tpl.toNumber }} or if you want to use some own helpers in a chain {{ tpl.chain your_helper1 fields tpl.chain your_helper2 tpl.chain your_helper3 plus_arg1 plus_arg2 }} … we are getting more and exited from that idea[/quote]

Looks cool. Chaining is always fun :slight_smile: Be aware also that spacebars sub expressions are probably landing in 1.1.1. Could lead to interesting mixes :slight_smile:

And yeah, you could chain mf calls but with the inline strings I’m not sure if it will be that comfortable. The idea is to use {{mf}} anywhere where you’d usually have full text. You can choose to only specify a key name and manually manage your translations though, some people do it.

1 Like

Hi @gadicc

thanks for reply, I will make a short test and have a look at your component as well. Keep you informed about that.

1 Like

How did it go @tomfreudenberg ? We are using messageFormat and love the power and simplicity.

spacebars subexpressions have arrived!

A very old topic, but I’m wondering what te current state is.

What are people doing regarding to i18n with the upcoming Meteor 1.3 release?

meteor-messageformat v2 has a react component. The v2 branch is still a pre-release, but a lot of people have been using it in production for some time now.

const App = () => (

  <div>
    <MF KEY="hello">Hello!</MF>

    <MF KEY='gender_like' GENDER={user.gender}>{`
      {GENDER, select,
          male {He}
        female {She}
         other {They}} liked this.
    `}</MF>
  </div>
);

There are more examples at http://messageformat.meteorapp.com/examples.

2 Likes

Our app for White Rabbit Express uses messageFormat. Great package!

1 Like

I noticed it thanks to the previous replies and this is really great!
The doc needs to be improved, esp. to avoid the confusion between the different versions and to take into account the meteor.com shutdown… but I could very quickly implement my i18n requirements and use its UI to localize strings.

Any idea when this will officially be released? This pre-release status is maybe blocking a wider visibility and adoption…

Thanks!

1 Like

Yeah, I know :frowning: Unfortunately I can’t commit to an ETA due to time constraints, but I think we’re pretty close now. Rewriting the docs is I think the last big thing (amongst a few smaller ones) on my list. The good news is that despite the pre-release status a lot of people (including myself) have been using it quite stably for quite some time now.

Thanks for reporting back on your positive experience!

@gadicc do you have a recommend for React? As you know we used Msgfmt for our Blaze project, but now I need something for a React project.

How’s your Japanese study going btw?

Hey @maxhodges!

Yeah, there has been react support for a while, even though it’s not advertised prominently.

You can see how it looks in the first few examples on the examples page.

And a link to the msgfmt-react github.

In the “traditional” meteor style, no import statement is required, but you can still do so for clarity. Moving forward, msgfmt will become a regular npm packages that will need to be imported as usual.

Good luck!

Japanese, I just haven’t had time :frowning: But actively trying to adjust my schedule to make time for it again. Loving the flash cards with the companion audio! Thanks :slight_smile: :slight_smile:

1 Like

oh thanks, I had no idea messageFormat worked with React.

Would be nice to see more React examples!

That was actually a link to a blog post I wrote about how to Internationalize Meteor with Universe:i18n , it wasn’t an ad for my business - which you seem to be posting in response for some reason? Strange…unless it’s spam as it’s your first post which really goes to show your 25+ years of “digital transformation” can’t have been too successful if you are reduced to spam posts to boost your SEO!