Jump to content

Invision Community Blog


Managing successful online communities

Mark
Sign in to follow this  
 

IPS 4.0: Internationalization and Localization

One of the things we wanted to focus on for IPS Social Suite 4.0 right from the beginning was providing better support for sites which do not use English or use multiple languages (or, as it was scribbled on my whiteboard, "++ i18n/L19n"). In this blog entry I'm going to cover some of those changes and new features.


Translatable Everything

Currently when you create a forum, user group, custom profile field, etc. you have to give it a title and can only do this in one language. If you have more that one language installed, you might want to provide different titles for different languages.

In 4.0 you can do exactly that - if you have only one language installed, these fields will continue to show as normal text boxes - however, if you have more than one installed you'll see several text boxes like this:



Visual Language Editor

One feature that has been really popular in IP.Board is the Visual Skin Editor - a tool which allows you to browse your site, and click on elements to bring up a colour selector to change it. What if we could take this idea and apply it to translating as well? Allowing you to click on any word or phrase on your site and translate it there immediately. In 4.0, you can.


Easier Language Management

In addition to the visual translation we've also made several improvements to the traditional translation method:

  • As you search for a language string, results appear as you type.
  • Editing a language string saves immediately without needing to click a save button.
  • Filter tabs can show you words/phrases which have not yet been translated or the translation is out of date (meaning we've changed the default English value for the word/phrase since it was translated).

We've also made importing/exporting much faster and more reliable - no matter how large your language is (it will grow as you add more applications of course) there is now no risk of hitting an error importing/exporting (for those interested in the technical side of how this is achieved, see this blog entry).

An exported language pack will also now maintain information on the version of each application it was exported from, so that the filter which shows outdated language strings is always accurate.


Automatic Language Detection

Let's say you have Spanish and French languages installed on your site - up until now, you'd have to choose one default language, and users who want the other would have to manually choose it (which can be extremely difficult to find how to do when you're browsing a site in a foreign language).

In 4.0, we automatically examine the information that the user's browser sends (which includes their preferred language) to choose the best one out of what's available, if that user hasn't already set an explicit preference.

Pluralisation

In English, pluralisation is very simple - for most nouns, you just append "s" on the end, with some variation for certain words.

This however, isn't the case in all languages - for example, I was speaking with the owner of a site in Slovak recently who was telling me that the word "records" changes depending on the number of records there are - for 2 records, it's "2 články", but for 5 records it's "5 článkov". Currently, most language strings only have a singular and plural form (as is all that's needed in English) - meaning having the site show "2 články"/"5 článkov" was impossible.

In 4.0, we've introduced some really basic logic into language strings to accommodate this. Rather than having, for example, two language strings with the singular and the plural, there is now one with a value like this:

{# [1:record][?:records]}


The # indicates where the number will go, then each set of square brackets represents a possible value - the number before the : indicating the number which will cause that to show, and ? meaning "all other numbers".

So for our Slovak example, we'd set the value to:

{# [1:článok][5:článkov][?:články]}


On display, it will automatically show the appropriate version.


Lists

Along a similar thread to pluralisation, we've also made the way lists are formatted to be customised through a special language string. For example, a list in English looks like "one, two and three". However, in Japanese, it's "一、二、三。" (the comma symbol is different and there's no "and") - similarly Arabic, Thai and others have similar differences. In 4.0, simply by changing an example language string, this can be changed.

In the default language, this language string is:

a, b and c


For our Japanese example, we'd just change it to:

a、b、c



UTF-8

Without wanting to get into too much technical detail - UTF-8 is the most common of many ways text can be encoded for storage and display on webpages. UTF-8 has been the default encoding in our software since IP.Board 3.0.

Some sites which have been around for a long while though may not be using UTF-8. This can cause issues with some features where UTF-8 encoding is expected (for example, many features which rely on JavaScript require UTF-8 due to JSON only supporting it and nothing else). In addition, some sites may try to use UTF-8, but content is actually stored differently as the database is set to a different encoding, which can also cause issues.

In 4.0, we're going all UTF-8. If you're not already on it, the upgrader will convert data. This means a much more reliable and compatible way of handling text.

Sign in to follow this  

Comments



Recommended Comments

I was actually wanting to suggest moving to UTF-8 by default, glad to see you are :tongue:

These updates look great. The visual language editor seems like it can definitely make things easier.

Keep up the awesome work!

Share this comment


Link to comment
Share on other sites

I'm very happy for "Pluralization". If you look good, there are many foolish things like this sentence: "1 user are online (in the past 15 minutes)" if there is only one user online, why put "are"? I'd love to have an instantaneous correction words - move from singular to plural when necessary.

Share this comment


Link to comment
Share on other sites

I have no idea for using different forum names in different languages. If i need forums for different languages it must be different categories or forums. Way of changing forum titles is the way to mixing topics in different languages.
In 3.0 you have a lot of problems with multibyte functions, if you will do all right with UTF-8 in 4.0 it will be greatest improvement.

Share this comment


Link to comment
Share on other sites

Thank you for that. Pluralisation is much needed and the Visual Language Editor is awesome too. 

 

One question, I know that interface will change and many of the current language strings will be different. Still, quite a few will be the same. Have you thought about a way to transfer those same strings from 3.x language pack to the 4.x. Or we will just have to start translating from scratch?

Share this comment


Link to comment
Share on other sites
{# [1:článok][5:článkov][?:články]}

I'm wondering, what if it's 1 = one word, 2-4 = another word, 5-99 = a third word, 100+ = yet another word?  Are there ways to group the numbers like [1:word][2-4:another][5-99:third][?:fourth]?

 

 

Visual Language Editor: A feature request I made long time ago. It is absolutely awesome that you guys are actually implementing this, making the translation so much more easy! Terrific!

I think I had made a mention of something like this too, though not in the way it sounds like it'll be implemented.  Though if it's going to be the way it sounds, then it'll likely be better than the way I suggested.

Share this comment


Link to comment
Share on other sites

for me as a translator this is extremely pleasant news! visual editor, plural stuff are great. however, please tell me more about these two things:

 

- if an old forum which has non-utf8 charset in tables will this upgrader do the same as http://community.invisionpower.com/files/file/2929-character-set-converter/ file does? Will UTF-8 conversion extend to third-party tables/columns somehow? Will there be a process for us to accomplish that?

 

- this question

 

I'm wondering, what if it's 1 = one word, 2-4 = another word, 5-99 = a third word, 100+ = yet another word?  Are there ways to group the numbers like [1:word][2-4:another][5-99:third][?:fourth]?

Share this comment


Link to comment
Share on other sites

 

  • As you search for a language string, results appear as you type.
  • Editing a language string saves immediately without needing to click a save button.
  • Filter tabs can show you words/phrases which have not yet been translated or the translation is out of date (meaning we've changed the default English value for the word/phrase since it was translated).

 

Thank you so much ;)

Share this comment


Link to comment
Share on other sites

Thank you for that. Pluralisation is much needed and the Visual Language Editor is awesome too. 

 

One question, I know that interface will change and many of the current language strings will be different. Still, quite a few will be the same. Have you thought about a way to transfer those same strings from 3.x language pack to the 4.x. Or we will just have to start translating from scratch?

 

From scratch. The language pack will be so different, it really isn't worth it.

 

 

I'm wondering, what if it's 1 = one word, 2-4 = another word, 5-99 = a third word, 100+ = yet another word?  Are there ways to group the numbers like [1:word][2-4:another][5-99:third][?:fourth]?

 

Not presently, though if this is a requirement in a particular language, we can change it.

 

 

More arbitrary-looking syntax, yay

 

It looks like your constructive alternative suggestion after your pointless sarcastic comment got cut off, could you post it again?

 

 

for me as a translator this is extremely pleasant news! visual editor, plural stuff are great. however, please tell me more about these two things:

 

- if an old forum which has non-utf8 charset in tables will this upgrader do the same as http://community.invisionpower.com/files/file/2929-character-set-converter/ file does? Will UTF-8 conversion extend to third-party tables/columns somehow? Will there be a process for us to accomplish that?

 

 

We haven't quite fleshed out the details but yes.

Share this comment


Link to comment
Share on other sites

I'm still trying to get how this syntax works but is it possible that these plural phrases will be okay? I give example of Lithuanian language word atsakymas which means reply/replies.

 

1 atsakymas

2-9 atsakymai

10-20 atsakymų

21 atsakymas

22-29 atsakymai

30 atsakymų

31 atsakymas

32-39 atsakymai

 

and so on. possible?

Share this comment


Link to comment
Share on other sites

I'm still trying to get how this syntax works but is it possible that these plural phrases will be okay? I give example of Lithuanian language word atsakymas which means reply/replies.

 

1 atsakymas

2-9 atsakymai

10-20 atsakymų

21 atsakymas

22-29 atsakymai

30 atsakymų

31 atsakymas

32-39 atsakymai

 

and so on. possible?

 

It is now :)

 

{# [%1:atsakymas][%0:atsakymų][?:atsakymai]}

Share this comment


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...