vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 5.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=259)
-   -   Show Thread Enhancements - Multilingual content (https://vborg.vbsupport.ru/showthread.php?t=326104)

delicjous 02-12-2018 10:00 PM

Multilingual content
 
1 Attachment(s)
I searched for a possibility to make content multilingual. So I try to use a bb-code to do it and it worked. So I will share to have more testing users and feedback.

If you want to have multilingual content you could create a new bbcode:

-BB Code Tag Name: translate (you should use something that others could not imagine to avoid other users to use it - if necessary)

-Replacement:
HTML Code:

<span class="vb_translation_{option}">{param}</span>
- Example:
HTML Code:

<span class="translation_1">This is a english text</span>
-Use {option}: Yes
-Remove Tag If Empty: Yes
-Disable BB Code Within This BB Code:No
-Disable Smilies Within This BB Code:No
-Disable Word Wrapping Within This BB Code:No
-Disable Automatic Link Parsing Within This BB Code:No

Now you have to create a new template and put in the following:
Templatename: YourTitle
HTML Code:

<style>
.translation_{vb:raw preferred_languageid} {
        display:none;
}
</style>

Save!

We will use a hook to get the css working:

Hook Location: footer_before_body_end
Title: Your title
Template Name: YourTitle

Save!

Thats it! If you change your language the text of language 1 one is not displayed anymore. Instead you will see the text in any other language.

You could use the bbcode in forum, article and every content like this:
[translate=1]This is a english text[/translate]
[translate=2]Das ist ein deutscher Text[/translate]

Pros:
- have more than one language in one post.
- google will crawl both (or more) languages. (not the best way for seo!)

Cons:
- Perhaps you have to increase postmaxchars to post in more than one language.
- You have to define a text for all languages or the post is empty!
- Didn't found any others yet!


Get more useful information, add-ons and widgets at vbulletin-forum.de!

saifo 04-30-2018 05:29 AM

nice idea
can I see an example?
is there also a pro version?

delicjous 05-02-2018 04:08 AM

I don't use it right now so I have no example. Iam searching for way to make a pro version but it will take time.

saifo 05-27-2018 03:59 PM

see the private message


All times are GMT. The time now is 09:03 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01684 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete