..:: AsmBB ::..: I18n ?
<img src="https://board.asm32.info/images/title.svg" alt="Title img">
<h1>AsmBB is ultrafast web forum, written entirely in assembly language. This site is the official support development forum and demo/test installation.</h1>
tag:board.asm32.info,2018-03-06:Thread2612019-06-08T06:50:10Zjohnfound on I18n ?tag:board.asm32.info,2018-03-06:Post158952019-06-08T06:50:10Z
<blockquote><header>KyberMax</header><p>By the way, it may make sense to introduce a lock on changing the post, which has already been answered.
</p></blockquote>
<p>Well, it may make sense, but I hardly dislike such solutions, because I prefer not to regulate by automatic features the human relations. Editing already answered post is actually a matter of ethics, not user interface. On the other hand, browsing editions history seems to be much more useful, but it needs a delta algorithm in order to be able to highlight the changes. I will definitely implement it when I have enough free time.</p>
johnfoundKyberMax on I18n ?tag:board.asm32.info,2018-03-06:Post158942019-06-08T06:08:15Z
<blockquote><header>johnfound</header><p>There is no "autolanguage" feature in AsmBB. In this very moment, the default language is English. Maybe you changed your language from your user profile?
</p></blockquote>
<p>Yes, I forgot last night to return to its original state.
</p>
<blockquote><header>johnfound</header><p>My mistake. This word is a <a href="https://en.wikipedia.org/wiki/False_friend">False friend</a> (Ложные друзя переводчика). <img class="inline" src="/templates/Urban+Sunrise/_images/emoticons/smile.gif" alt=":-)" />
</p></blockquote>
<p>Yes, then google translator is a perfect friend: he constantly changes the translation options to often worse ones (in my opinion). I correct in one place, and he changes in another place. I did not follow yesterday, today I went to the forum to correct and supplement the post and did not notice that you already answered, sorry. Look at my previous post.
</p>
<p>By the way, it may make sense to introduce a lock on changing the post, which has already been answered.
</p>
KyberMaxjohnfound on I18n ?tag:board.asm32.info,2018-03-06:Post158932019-06-07T22:57:39Z
<blockquote><header>macadoum</header><p>Hello johnfound, as I said <a href="https://board.asm32.info/asmbb-v2-5-has-been-officially-released.267/#15784">here</a>, I update the French translation. I just send the files attached as a zip.
</p>
<p>But there is some strings I cannot translate, here in red :
</p>
<p>I check for others languages and these strings aren't translated too because it's actually not possible.
</p>
<p>Another problem is that the theme selector upper right is actually broken and doesn't change anything if using a different language than english.
</p>
<p>I hope these problems can be fix.
</p></blockquote>
<p>Well, I have fixed everything (if I didn't miss something <img class="inline" src="/templates/Urban+Sunrise/_images/emoticons/lol.gif" alt=":-D" />) and the templates are replaced here, on the demo forum.
</p>
<p>The changes are in the following commits:
</p>
<p><a href="https://asm32.info/fossil/repo/asmbb/info/aff36efaf1561e80">https://asm32.info/fossil/repo/asmbb/info/aff36efaf1561e80</a>
</p>
<p><a href="https://asm32.info/fossil/repo/asmbb/info/ed1b94ece466b129">https://asm32.info/fossil/repo/asmbb/info/ed1b94ece466b129</a>
</p>
<p><a href="https://asm32.info/fossil/repo/asmbb/info/7ca025e53e7f712d">https://asm32.info/fossil/repo/asmbb/info/7ca025e53e7f712d</a>
</p>
<p>But there is a problem: The recent template changes (including the translation fixes) are in the branch <a href="https://asm32.info/fossil/repo/asmbb/timeline?r=RealTimeEvents&c=2019-06-07+22%3A46%3A10">RealTimeEvents</a> which is work in progress.
</p>
<p>So, for now, these changes are useful only as a reference and will be merged in the trunk when the work on the branch is finished.
</p>
johnfoundjohnfound on I18n ?tag:board.asm32.info,2018-03-06:Post158922019-06-07T22:28:12Z
<blockquote><header>KyberMax</header><p>I see on the forum earned auto language. Did you do it through IP?
</p></blockquote>
<p>There is no "autolanguage" feature in AsmBB. In this very moment, the default language is English. Maybe you changed your language from your user profile?
</p>
<blockquote><header>KyberMax</header><p>By the way, here is the first result: instead of "потребитель" it is more correct to use "пользователь".
</p></blockquote>
<p>My mistake. This word is a <a href="https://en.wikipedia.org/wiki/False_friend">False friend</a> (Ложные друзя переводчика). <img class="inline" src="/templates/Urban+Sunrise/_images/emoticons/smile.gif" alt=":-)" />
</p>
johnfoundKyberMax on I18n ?tag:board.asm32.info,2018-03-06:Post158912019-06-07T21:08:49Z
<blockquote><header>johnfound</header><p>The session cookies are always deleted after the end of the session. You can configure the browser to delete the persistent cookies after the session, but this is totally different story.
</p></blockquote>
<p>Yes, and there is some illogicality here because of the definition of "session." Most likely it appeared when browsers did not have tabs and the session lasts until the browser is closed. Although it would be more logical to end the session with the site when you close all the tabs of this site.
</p>
<p>I see on the forum appeared automatically determine the user's language. Through IP probably?
</p>
<p>By the way, here is the first result: instead of "потребитель" it is more correct to use "пользователь". Or even "участник форума".
</p>
KyberMaxjohnfound on I18n ?tag:board.asm32.info,2018-03-06:Post158902019-06-06T21:23:06Z
<blockquote><header>KyberMax</header><p>Yes, if only session cookies are deleted after each session. If the browser is not configured to do this, then the settings are saved in the next session.
</p></blockquote>
<p>The session cookies are always deleted after the end of the session. You can configure the browser to delete the persistent cookies after the session, but this is totally different story.
</p>
<p>AsmBB uses persistent cookies only for the login and only if you check the "Persistent login" checkbox. Else it uses session cookie that is deleted after the browser closed.
</p>
johnfoundKyberMax on I18n ?tag:board.asm32.info,2018-03-06:Post158892019-06-06T19:16:57Z
<blockquote><header>johnfound</header><p>The fast theme selector on the top of the page works with session cookie and if you close the browser and open the forum again, this setting will be reset to default.
</p></blockquote>
<p>Yes, if only session cookies are deleted after each session. If the browser is not configured to do this, then the settings are saved in the next session.
</p>
<blockquote><header>johnfound</header><p>The interface language setting, on the other hand, has no need to be so flexible. Usually, the interface language is the same as the language the forum users write their posts. Multi-language forums (like this demo forum) are actually very, very rare.
</p></blockquote>
<p>In fact, multilingual sites usually determine the language of the user by the IP address, but additionally provide the ability for the user to set the language manually. Imho this option should be on any page of this forum, because it is not only multilingual, but also a demo, so it is simply necessary at least to check the correctness of language support.
</p>
KyberMaxjohnfound on I18n ?tag:board.asm32.info,2018-03-06:Post158882019-06-05T21:21:17Z
<blockquote><header>KyberMax</header><blockquote><header>johnfound</header><p>...you still can select different language from your user profile.
</p></blockquote>
<p>It works. But why the theme can be selected on the forum page and in the profile, and the language only in the profile? Imho this is inconvenient.
</p>
</blockquote>
<p>The fast theme selector differs a little from the theme selector in your profile and from the default theme selector in the forum settings.
</p>
<p>The fast theme selector on the top of the page works with session cookie and if you close the browser and open the forum again, this setting will be reset to default. This mechanism was created solely for use from the unregistered guests, because they simply have no profile.
</p>
<p>The profile theme setting simply overrides the forum default setting. But it also forces the forum to a single theme, while if set to "default" it will change the theme with the mobile theme if browsing from a mobile device.
</p>
<p>The forum default theme setting is actually two settings: one theme for the PC browsers and one theme for the mobile phone browsers.
</p>
<p>The whole design is planned in a way to softly press the users to use the administration preferred themes, while still allowing override if the user hardly dislike the official choice.
</p>
<p>The interface language setting, on the other hand, has no need to be so flexible. Usually, the interface language is the same as the language the forum users write their posts. Multi-language forums (like this demo forum) are actually very, very rare.</p>
johnfoundKyberMax on I18n ?tag:board.asm32.info,2018-03-06:Post158872019-06-05T20:44:49Z
<blockquote><header>johnfound</header><p>...you still can select different language from your user profile.
</p></blockquote>
<p>It works. But why the theme can be selected on the forum page and in the profile, and the language only in the profile? Imho this is inconvenient.
</p>
KyberMaxjohnfound on I18n ?tag:board.asm32.info,2018-03-06:Post158842019-06-05T04:23:33Z
<blockquote><header>KyberMax</header><p>On my computer, the forum has switched to Bulgarian, switching themes works. How to put another language I did not find.
</p></blockquote>
<p>Oh, sorry! By mistake I switched the default forum language to Bulgarian. But you still can select different language from your user profile.
</p>
johnfoundKyberMax on I18n ?tag:board.asm32.info,2018-03-06:Post158822019-06-04T17:01:05Z
<blockquote><header>johnfound</header>
<blockquote><header>macadoum</header><p>Another problem is that the theme selector upper right is actually broken and doesn't change anything if using a different language than english.
</p></blockquote>
<p>But I can't reproduce the quoted problem. I am using the Bulgarian translation of the forum and the fast theme selector is working OK for me... Or I am doing something wrong?
</p></blockquote>
<p>On my computer, the forum has switched to Bulgarian, switching themes works. How to put another language I did not find.
</p>
KyberMaxjohnfound on I18n ?tag:board.asm32.info,2018-03-06:Post158812019-06-04T14:06:14Z
<p>@macadoum: Thanks for the report. I will try to fix it ASAP - probably in 1..2 days.
</p>
<blockquote><header>macadoum</header><p>Another problem is that the theme selector upper right is actually broken and doesn't change anything if using a different language than english.
</p></blockquote>
<p>But I can't reproduce the quoted problem. I am using the Bulgarian translation of the forum and the fast theme selector is working OK for me... Or I am doing something wrong?</p>
johnfoundmacadoum on I18n ?tag:board.asm32.info,2018-03-06:Post158802019-06-04T13:53:15Z
<p>Hello johnfound, as I said <a href="https://board.asm32.info/asmbb-v2-5-has-been-officially-released.267/#15784">here</a>, I update the French translation. I just send the files attached as a zip.
</p>
<p>But there is some strings I cannot translate, here in red :
</p>
<p><img class="block" src="https://i.imgur.com/IbojzAZ.png" alt="My picture" />
<img class="block" src="https://i.imgur.com/h1S6FTu.png" alt="My picture" />
</p>
<p>I check for others languages and these strings aren't translated too because it's actually not possible.
</p>
<p>Another problem is that the theme selector upper right is actually broken and doesn't change anything if using a different language than english.
</p>
<p>I hope these problems can be fix.</p>
macadoummlmsoftwareindia on I18n ?tag:board.asm32.info,2018-03-06:Post158712019-05-18T07:21:52Z
<p>SEO spam deleted.
</p>
<p>The administration</p>
mlmsoftwareindiajohnfound on I18n ?tag:board.asm32.info,2018-03-06:Post157662019-02-17T10:26:19Z
<p>Great, thanks! <img class="inline" src="/templates/Urban+Sunrise/_images/emoticons/smile.gif" alt=":-)" />
</p>
<p>I will integrate it into the whole system and will publish it in a several days as an official release. Will ask in this thread if something is not clear.</p>
johnfoundmacadoum on I18n ?tag:board.asm32.info,2018-03-06:Post157652019-02-16T22:28:35Z
<p>I finished the translation of the wasp template. I don't know how you want to integrate my translation into your i18n system.
</p>
<p>I send it through an attached file.
</p>
<p>I'm not sure it can help you in its actual form. Please ask if you need anything more.<img class="inline" src="/templates/Urban+Sunrise/_images/emoticons/wink.gif" alt=";-)" /> </p>
macadoumjohnfound on I18n ?tag:board.asm32.info,2018-03-06:Post157642019-02-15T12:31:15Z
<blockquote><header>macadoum</header><p>So if I understand well, this must be done for every file to get a fully translated interface ?
</p>
<p>I mean each file will get it's own
</p><pre><code class="">
<p>[case:[special:lang]|
<a href="....
<a href="....
<a href="....
<a href="....
</div>
</code></pre>
<p>Right ?
</p></blockquote>
<p>Generally speaking yes. But it needs also <code>|</code> character as a separator. The template operator <code>[case:]</code> has the following syntax:
</p>
<pre><code class=""> [case:NUMBER|TEXT_FOR_0|TEXT_FOR_1|...|TEXT_FOR_N_AND_ABOVE]
</code></pre>
<p>It leaves in the output text only the text that corresponds with the value of the <code>NUMBER</code>. The operator <code>[special:lang]</code> returns the number of the language for the particular user.
</p>
<p>Using this construction, several variants of use are possible. In the my example, there are two of them. The first includes into the <code>case</code> text list, the whole text together with the HTML markup. This variant is suitable when there is little markup and more text in the translated block. The drawback is that if the markup need to be edited later, there are several copies of this markup that need to be kept in sync.
</p>
<p>The other variant is to translate only the text without the markup, like in the following example:
</p><pre><code class=""><p>[case:[special:lang]|Page processing time|Време за обработка на страницата|Время обработки страницы|Temps de traitement de la page]: [special:timestamp] ms</p>
</code></pre>
<p>This way, the HTML markup is only in one copy and synchronization on edits is not needed. But in many cases, this approach need more <code>[case:]</code> operators, this way making template slower for rendering and lowering the performance of the engine.
</p>
<p>So, as always it is a matter of tradeoff and personal style preferences. <img class="inline" src="/templates/Urban+Sunrise/_images/emoticons/smile.gif" alt=":-)" />
</p>
<p>Anyway, all this is not so important. The content is important. I always can help on the particular formatting.
</p>
johnfoundmacadoum on I18n ?tag:board.asm32.info,2018-03-06:Post157632019-02-15T11:27:15Z
<blockquote><header>johnfound</header><p>will wait for volunteers to finish the french translation.
</p>
</blockquote>
<p>This is now done by 80%
</p>
macadoummacadoum on I18n ?tag:board.asm32.info,2018-03-06:Post157622019-02-15T11:24:59Z
<p>So if I understand well, this must be done for every file to get a fully translated interface ?
</p>
<p>I mean each file will get it's own
</p><pre><code class="">
<p>[case:[special:lang]|
<a href="....
<a href="....
<a href="....
<a href="....
</div>
</code></pre>
<p>Right ?</p>
macadoumjohnfound on I18n ?tag:board.asm32.info,2018-03-06:Post157612019-02-15T09:48:53Z
<p>OK, now AsmBB has a "true" internationalization of the user interface. It is based on the user preferences, so every user can choose the UI language.
</p>
<p>The translation is based on the rendering engine, so it loads the backend a little, but I hope the engine will be anyway fast enough.
</p>
<p>Of course, the whole skins are still not fully translated. I will make some effort to finish the Bulgarian and Russian translations and will wait for volunteers to finish the french translation.
</p>
<p>The idea of the translation is demonstrated in the following template example (a part of the file <code>main_html_end.tpl</code>):
</p>
<pre><code class=""><div class="footer">
<p>[case:[special:lang]|
<a href="/!users_online" title="Recent activities of the visitors.">Online</a> now: [special:visitors]
|
<a href="/!users_online" title="Последни действия на посетителите.">Онлайн</a> в момента: [special:visitors]
|
<a href="/!users_online" title="Последние действия потребителей.">Сейчас</a> в сети: [special:visitors]
|
<a href="/!users_online" title="Activités récentes des visiteurs.">En ligne</a> maintenant: [special:visitors]
]
</p>
<br>
[special:stats]
<br>
<p>[case:[special:lang]|Page processing time|Време за обработка на страницата|Время обработки страницы|Temps de traitement de la page]: [special:timestamp] ms</p>
</div>
</code></pre>
<p>It is based on the <code>[special:lang]</code> special parameter and <code>[case]</code> template operator. <code>[special:lang]</code> returns a number according to the language selected by the user. The values are:
</p>
<pre><code class="">Values of [special:lang] parameter:
0: English
1: Bulgarian
2: Russian
3: French
</code></pre>
<p>P.S. In the above example, the French phrases are translated with google, so can be incorrect.</p>
johnfound