Jump to content

Community

Add language selector for the '\IPS\forums\Forum' Item


Recommended Posts

Hello, IPS and community! I want to propose you to a little bit of improvement to the 'Forums' item. This option is a selector of speaking language for the selected forum (category/discussion/faq). Some big communities having their special sections for people, speaking in French, Italian, German and other languages. If we implement this selector for the forum we'll open a perfect point for making other useful stuff. There is a list of what it can be:

  1. we can create a lot of ElasticSearch indexes with a correct language analyzer. So the French guy can search something in his language and get the results for his language section
  2. we can add an option inside Account Settings to provide people the ability to select the language, which he can understand. For example, some EU guy selected English, Deutch, and Italian language. This setting provides a lot of next points
  3. When people set up their preferable language then we can filter other language sections from the view in front of forums, we can filter the widgets results (German people, whose don't understand French feel annoyed when he see active discuss in French section and whole of HOT or Recent widgets returns most of the results in French). It's very unuseful widgets for him. (I can PM you the forum link and you'll see the problem in action).
  4. By the special setting, users might show to other users languages, which the author can understand. So some popular guy can say to each other, that he can talk in a special list of languages and he glad to talk in PM in, for example, Espaniol and Turkish
  5. ... 

What do you think about that?
 

Link to post
Share on other sites
1 hour ago, Upgradeovec said:

What do you think about that?

This would be genius. We are evaluating new project now in three languages. Using IPS I have to install three separate projects (with three separate licenses) to just separate the user content in different languages. Wortlab can do it (see there start page and switch languages), that is the only reason why we look into it. But I would prefer to work with IPS :rolleyes: if it were possible.

Quote

 This option is a selector of speaking language for the selected forum (category/discussion/faq).

I would mark every user content item according to his preferred language (forum post, blog entry and so on) throughout the whole suite and not just nodes though...

Link to post
Share on other sites
9 hours ago, Sonya* said:

I would mark every user content item according to his preferred language (forum post, blog entry and so on) throughout the whole suite and not just nodes though...

Yes, i also thought about it, but this must be an configurable, because sometimes user can post not in his language, as well as his language might be not present on site at all.

I.e, there must be a field near the editor, where user can set the language of his post, set to his preferred language by default.

Edited by Mr 13
Link to post
Share on other sites
5 hours ago, Sonya* said:

I would not rely on anything user must set or select. The most of them will not change anything. I would rather use language detector https://github.com/landrok/language-detector

I also thought about lang-detectors, but as i did not tested it yet, i'm not sure how many wrong detections will be there? Especially in cases when post contains something in two or more languages in the same time, or when it includes a code, for example?

I agree that maximum automation is always good, but if we could fix some problems in it with a simple additional option, then why not?

Looks like in this case only a combination of this all approaches could give a good results.

I mean, users definely must not be forced to select, but if they will have an option to select it manually in case of wrong detection/etc, it will be still better.

Edited by Mr 13
Link to post
Share on other sites

About the content items (topics/posts/etc).

From user side i'd prefer to have something like this:

1. Language preferences in the "Settings" section:

image.thumb.png.65107496e1cfd448e6f9f752f1f071ed.png

2. Setting in the editor, with default value set according to the user's preference, i.e. "detect" in the first case, or "user-defined language" in the second (on the screenshot), or "nothing + field becomes required" in third.

image.thumb.png.9f7ca85c10af95758f5e2c2060e9beb2.png

3. A little clickable icon in every message on the top right, near the sharing button.

image.png.7c8b5fdc25c1b1179a94f0c9cf4a57dd.png

3.1. In case if it's your message, on the click/tap it opens a menu where you can change a language (for example in case when it was detected incorrectly):image.png.f0505a1c2de151ca493af2d1a2ce5063.png

3.2. In case if it's someone else's message and if admin has set his API keys for Google Translate or any other translation service which IPS would decide to support, then it opens menu which allows you to translate this message to your language:

image.png.0c2bf95f8ba3a4bdecb7d4d8fb2e05d1.png


And important thing: before passing a message to a language detector we should strip all contents of <code> <pre> <blockquote> and similar tags in passed message, as in the lot of cases those tags will contain something what could cause wrong detection.

Edited by Mr 13
Link to post
Share on other sites

For the 'comment' type of data, I see no way for any right solution. Translators always working very bad and this feature (as I think) can't be a regular part of normal using. And this looks a little bit strange to see the topic, where commenters write in different languages.

Anyway, this talking might be very long and this is outside of the main proposal - adding a language selector to the 'Container' element (Forums) of Items (Topics). This way looks clear, simple and becomes like a good starting point for other useful features.

Link to post
Share on other sites

@Upgradeovec, for our needs we would like to have main views dependent on the language. Especially blocks and activity streams. If user have chosen English as a language then he should see only items (nodes) in this language. And blocks. And activity streams filtered by his language. And we also need RSS dependent on the language to export into other resources. 

Another "issue" would be: It is also not enough just to use cookies for Google for this solution. Google prefers different URLs for the multi-language sites: https://support.google.com/webmasters/answer/182192?hl=en So, there should be very deep change in the suite URL structure so that Google is not confused by different languages mixed together on one project.

Link to post
Share on other sites

@Sonya* activity streams can be filtered by language nodes - this is included in the main proposal of 'Forums'. Blocks - another painful part, agree with you. On Pages, I use little bit PHP code for that. Just get current user language and paste it into block calling. Very unuseful, but.. can't do in other ways. Blocks on the forum side - I don't know how to manage it now and don't see the pretty solution to solving them. It's painful, but it's a few other stories. We can't come to IPS with a lot of pains with languages and just ask for fixing it in anyways. I think the one possible way to start moving is a clear task with pain and proposal to solve it (i can write the example code too). And then pray that IPS get it. After this one step, we might think about the next steps with the same way of proposals or code examples. I feel pains with languages too. In different places. For example, currently, I have a bug with some landing, which built with Pages and blocks (where I had {lang="something"} keys). It working well except title and description. It set up on the page setting, which does not support multilanguage. So for fixing that I'll turn off the default title expression in the theme and fill it with the language key for specified page only. It's weird and stupid. But I have no idea how to do this right.

Link to post
Share on other sites
  • 2 weeks later...
On 7/16/2019 at 9:54 AM, Upgradeovec said:

this looks a little bit strange to see the topic, where commenters write in different languages.

On our forums it's very common case. As we have a lot of useful information on our forums in Russian, our users from other countries are using Google Translate for reading and they write their replies in their native language.

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy