Forem Creators and Builders 🌱

Ben Halpern
Ben Halpern

Posted on • Edited on

Forem: Open for Internationalization

Hey folks, we recently shipped some initial code to make it possible to translate Forem... And if anyone wants to contribute, they are welcome.

I made a post on DEV about this in more detail...

We are not yet ready to start accepting many different translations, but we are ready to insert more translatable elements into the code. Check out my post if you want to dig into the code and look for places which can be translated. πŸ˜„

Please expect this to happen gradually, but eventually many languages will be supported for the Forem display.

Top comments (14)

Collapse
 
varhal profile image
Varhal

This is awesome. Tell me, will there be support for international url articles and tags?

Collapse
 
ben profile image
Ben Halpern

I believe some or all of this flexibility has already been implemented.

Collapse
 
ben profile image
Ben Halpern

(I created that test tag just to see for myself πŸ€ͺ)

Collapse
 
varhal profile image
Varhal

I think Russian url should transliterate to forem.dev/varhal/patterny-dizayna-...

Collapse
 
varhal profile image
Varhal

I create test post, but url not supported russian language:
Alt Text

Thread Thread
 
varhal profile image
Varhal

@ben

Do you plan to fix this? ty

Thread Thread
 
djuber profile image
Daniel Uber

I think this is the same problem described here - any non ascii characters (including all Russian words) are omitted when generating url slugs for posts.

A few suggestions were using punycode (via the addressable library, replacing non-ascii text with an encoded representation) or using the unicode escapes to produce ascii urls, the way wikipedia does, with a url like ru.wikipedia.org/wiki/%D0%97%D0%B0... which displays fine in the browser but could seem a little ungainly when written in ascii.

Thread Thread
 
jamie profile image
Jamie Gaskins

@djuber The slug exists for SEO reasons. Going by this table, I'm not sure Punycode would help achieve that goal:

Punycode table from the linked Wikipedia page

@ben @varhal According to the URI spec, URIs can only contain 7-bit ASCII characters. The application strips all non-ASCII characters to avoid %-encoding them as bytes, which would make the URL 2-4x as long and impossible to read, while (from what I can tell) also not contributing to SEO.

As @varhal mentioned elsewhere in this thread, transliteration to Roman characters is a good idea. We might be able to achieve that through this library.

Thread Thread
 
varhal profile image
Varhal • Edited

I support this idea. I hope the developers will listen to it πŸ‘. @ben what do you think about it?

Thread Thread
 
jamie profile image
Jamie Gaskins

@varhal Can you check out this PR?

Thread Thread
 
varhal profile image
Varhal • Edited

Yes, that's what I need.. thanks

Collapse
 
violing profile image
Turing

Looking forward to the Chinese version
ζœŸεΎ…δΈ­ζ–‡η‰ˆζœ¬

Collapse
 
alvaromontoro profile image
Alvaro Montoro

This is great. I'd be happy to help with Spanish.

Collapse
 
citizen428 profile image
Michael Kohl

Thanks a lot for the offer! We're currently at a stage where we want to get English and French right before we start adding more languages but Spanish is definitely one of the languages we're interested in supporting sooner rather than later.