solved How to build a JrElastic multilingual-based site using the Site Builder?

pch
@pch
10 years ago
328 posts
Hello Friends,

I love the Site Builder feature. But I am kind of lost using it. Can Site Builder be used to build a multilingual site (en, fr, es, pt). if the answer is yes, then please tell me how?

Thanks
updated by @pch: 02/18/16 02:02:57AM
douglas
@douglas
10 years ago
2,806 posts
The language files and the jrCore_lang function are what makes the site multi lingual.

https://www.jamroom.net/the-jamroom-network/documentation/development/783/jrcore-lang

You'll want to make sure that whatever you want translated is using the jrCore_lang function.

ie.

{jrCore_lang skin=jrCore_active_skin id="XX" default="Default Text"}


where XX is the language id you want and the Default Text is whats used if the function doesn't find the id in the language file.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
brian
@brian
10 years ago
10,149 posts
Creating a multi lingual site is a little bit more involved than just clicking buttons - mainly because you need to tell Jamroom WHAT language strings need to go where.

For existing templates used in Site Builder (say creating an audio list) then YES - those templates are setup to be multilingual. That does NOT mean the language you want to use is supported - support for languages other than en-US has to be ADDED to Jamroom. You can do this via the "Clone a Language" option in the ACP -> Users -> User Accounts -> Tools section.

Once that is done, the you would do like Douglas has outlined and use the {jrCore_lang} function in your custom templates to tell JR what lang string to place there.

Let us know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
pch
@pch
10 years ago
328 posts
brian:
Creating a multi lingual site is a little bit more involved than just clicking buttons - mainly because you need to tell Jamroom WHAT language strings need to go where.

For existing templates used in Site Builder (say creating an audio list) then YES - those templates are setup to be multilingual. That does NOT mean the language you want to use is supported - support for languages other than en-US has to be ADDED to Jamroom. You can do this via the "Clone a Language" option in the ACP -> Users -> User Accounts -> Tools section.

Once that is done, the you would do like Douglas has outlined and use the {jrCore_lang} function in your custom templates to tell JR what lang string to place there.

Let us know if that helps.

Hey Brian,

Thanks for the reply.

1) I have all the module installed and I have already cloned the language. Now I have 4 languages. (English, Spanish, French and Portuguese)

2) In the template, I have already added the code to display the language flag.

3) Where exactly in the jrElastic Skin should the {jrCore_lang} function be added? Can it added globally. Example: to the header?

Please can you be more specific and show us a Comprehensive Step-by-Step Guide on how to build a multilingual site using the Site Builder and the jrElastic skin?

Many Thanks in advance.
pch
@pch
10 years ago
328 posts
douglas:
The language files and the jrCore_lang function are what makes the site multi lingual.

https://www.jamroom.net/the-jamroom-network/documentation/development/783/jrcore-lang

You'll want to make sure that whatever you want translated is using the jrCore_lang function.

ie.

{jrCore_lang skin=jrCore_active_skin id="XX" default="Default Text"}


where XX is the language id you want and the Default Text is whats used if the function doesn't find the id in the language file.

Hey Doug,

Thanks four fast reply.

I am still confused. As said in my previous post: Where exactly in the jrElastic Skin should the {jrCore_lang} function be added? Can it be added globally.

Or Should it be added manually to the code, meaning template page per template page? Can it be declared once in the template header so that it can apply to the whole site (template)?

Thanks
brian
@brian
10 years ago
10,149 posts
It needs to be added anywhere there is a hard coded string you want to change depending on the viewers language.

If you have created a template, and inside you have:

<b>This is a hardcoded HTML string</b>

You would change it to:

<b>{jrCore_lang skin="YourCustomSkinDirectory" id="5"}</b>

This would line up with id "5" in your skins/YourCustomSkinDirectory/lang/*.php files

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
pch
@pch
10 years ago
328 posts
brian:
It needs to be added anywhere there is a hard coded string you want to change depending on the viewers language.

If i understand you well, it means it is almost impossible to use the jrElastic skin for multilingual site, unless I manually add the {jrCore_lang} to every single code or text within the skin, right? The jrElastic skin is not ready for multi languages right?

I am not creating a new template. I will be using the jrElastic skin with the JR modules. I will not create new modules. i will be using the ones i installed from the marketplace. The jrElastic skin and modules don't have the jrCore_lang built-in?

Very confusing.
updated by @pch: 11/09/15 04:51:18PM
brian
@brian
10 years ago
10,149 posts
No - that is incorrect - all of our skins are already setup to use jrCore_lang throughout - Elastic is just not setup with flags (since it only had 1 language file - en-US)


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
pch
@pch
10 years ago
328 posts
brian:
No - that is incorrect - all of our skins are already setup to use jrCore_lang throughout - Elastic is just not setup with flags (since it only had 1 language file - en-US)

Thanks Brian,

I was really sad after reading your previous post but now I feel better. I love JR, I love the new site builder feature and I love the jrElastic skin. It's clean, modern and looks professional although all the skins are professional too.

It's reassuring to know that all the skins are already setup to use jrCore_lang throughout. Great news!

I have cloned the English file. Now I have 4 languages and i have started translating them. Also i have added the code for flags. Then i think I should be ready to go! I will just be adding widgets using the Site Builder

What do you mean by "Elastic is just not setup with flags"? Is there anything else to be done beside adding the code (flags) to change the languages like described in here?:

https://www.jamroom.net/the-jamroom-network/documentation/development/541/translate-jamroom-into-another-language


Thanks
michael
@michael
10 years ago
7,805 posts
The problem I see with creating a multi-lingual site is the content.

When a spanish user uploads an audio track and calls it:
"Donde Esta la Pollo"

Then a french user adds a song and calls it:
"Où est le poulet"

What is an english user going to see? Are they only going to see songs that are in english? Are they going to see all the songs? If so what do you do about the title for songs that are not in english? You could use the Form Designer and require all users to upload a title in all 3 languages, but not all users know all three languages.

There is a lot to development thought that needs to go into multi-lingual sites. Google gets it wrong and it annoys and frustrates me every time I encounter it and they have money and developers.

Another thing that needs to be thought about is are you capable of replying to email requests that come in in each of the languages.
pch
@pch
10 years ago
328 posts
Hi Michael,

Yes the multi-languages approach in JR still needs to be improved a lot. So many things still need to be done.

I am a Joomla user and Joomla is very very far beyond JR when it comes to handling multi-languages. Many joomla template providers like rockettheme, joomlart etc have their own framework (gantry, T3 etc) which works almost like the JR site builder (with widgets and modules drag etc) but they are a little bit more advanced than the one provided here in JR and they are handling multi-languages pretty well.
Maybe the JR Dev team should learn from Joomla and their template providers how they handle multi-languages and maybe copy from them. They have done an awesome work. IMHO, even the translation approach in JR needs to be discussed again.

In Joomla and their templates (3rd party templates), I can build modules (widget) and module positions dragging things here and there. I can create menus and menu items and assign them to the language I want (en, es, fr, pt etc). but I can't do it here in JR.

About what you have said, I think it shouldn't be a big issue. Only the site interface should be translated. No need to translate the site content (audio and video). if there are many languages, the user is going to see all the songs but he/she can filter them with keyword searches or tags in a specific language. Many audio-video sharing sites like youtube use this approach.

Yes, replaying email requests that come in each of the languages is a bit challenging, but for someone who speaks all these languages, that shouldn't be a big deal.

Thanks
updated by @pch: 11/13/15 07:15:52AM
pch
@pch
10 years ago
328 posts
Also:

1) Right now i am stuck with the translation of the menu created using the menu builder / editor. How to get it translated when the site language change? The "Create account" and "sign in" menu item get translated because they are hardcoded. What about the menu item created with the menu editor? How to translate them without hacking the code?

2) I have 4 facebook fan pages. One for each language version I will be offering (en, es, fr. pt) and 4 mailing lists (en, es, fr. pt) from another mailing service that provide me with a newsletter sign up form code snippet that I can place anywhere on the internet.

How to place them in JR using the Site Builder? How to get the English Facebook Fan box to show when the english version of the site is displayed and the Spanish Facebook Fan box when the spanish version of the site is displayed and so forth?

Using the Site Builder, how to display the english newsletter sign up form (for the english mailing list) when the site is displayed in English, and the spanish newsletter sign up form (for the spanish mailing list) when the site is displayed in spanish and so forth?

3) How to translate meta tag of page created using the site builder? How to add the meta tag corresponding to a specific language version?

Please, if someone can help me with these questions I will appreciate it. I am stuck!

Thanks for helping.
michael
@michael
10 years ago
7,805 posts
The things you are looking to do are difficult to do with Site Builder, it would be easier no to use it in this case.

The $_user variable will contain the language that the user has chosen which can be used in templates, but there is no site builder button for it.

Same thing for the sections. It would be easier to use an {if} template block than to try to do it with site builder.
Jamroom was previously developer focused. Site Builder has come along as a response for the need to have a system for non-developers. You can still do more by editing the skin templates than you can with Site Builder. Your suggestions are good ones though and hopefully with time we can get those systems integrated.
pch
@pch
10 years ago
328 posts
Thanks Michael,

Yes, I am just realizing that the site builder is pretty awesome but limited in many things and maybe it won't help me a lot with multi languages. I will probably need to manually hack the jrElastic code. I am extremely sad.

I had almost given up with Jamroom and the site builder was the ONLY thing that brought me back here and re-hiter my confiance to Jamroom. I love this site builder and menu editor a long with the Elastic skin.

IMHO the site builder is the most revolutionary feature / tool ever built in JR. Hats off to the JR Dev Team. What a great job!!! .

I've thought I would have been able to easily build a multilingual site using the site builder and menu editor. Unfortunately that's not the case. I am very frustrated and disappointed at the same time by the fact that I won't probably use them.

How can JR Developers work in a new JR version, new skin, new site builder system etc which is great and then just leave the multi languages aspect (one of the most important features) behind? Why? I just can't believe it.

You have forgot to answer the question #1 and #3. Please can you help me? Thanks. If I can not do it with the site Builder, then how can I do it in JR? (probably hacking the code, right? but how?)

About question #2, which widget should i use to place the {if} template block, if i had to use the site builder? HTML Editor or Template Code Widget?

Thanks
updated by @pch: 11/13/15 08:25:25AM
brian
@brian
10 years ago
10,149 posts
pch:
How can JR Developers work in a new JR version, new skin, new site builder system etc which is great and then just leave the multi languages aspect (one of the most important features) behind? Why? I just can't believe it.

Site Builder is still in beta... :)


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 11/13/15 08:29:48AM
pch
@pch
10 years ago
328 posts
brian:
pch:
How can JR Developers work in a new JR version, new skin, new site builder system etc which is great and then just leave the multi languages aspect (one of the most important features) behind? Why? I just can't believe it.

Site Builder is still in beta... :)

Funny answer, Brian. Would you mind driving me through a solution to the questions posted above.

Thanks in advanced.
brian
@brian
10 years ago
10,149 posts
pch:
Funny answer, Brian. Would you mind driving me through a solution to the questions posted above.

Just to be sure you understand - Site Builder still being in beta means there may be:

- things that don't work as expected
- bugs that have not been found yet
- features that have not been implemented.

I've just seen you post about your frustration and annoyance that it's not working like you expect - i.e.:

Quote:
I am very frustrated and disappointed at the same time

And I wanted to be sure you know that Site Builder is in beta, and understand that it may not suit your needs.

If multi-lingual is really high priority for your site, then Site Builder is not going to work for you at this time. The items you want translated (menu items, getting specific pages to show only on pages for specific languages) are NOT supported, so I have no solution or help to provide on that.

We can definitely look into language improvements for Site Builder once we get Jamroom 5.3 out of beta and start focusing on it again, but for now what you're looking for is not supported.

Sorry!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
10 years ago
10,149 posts
Just wanted to add as well - it sounds like you have a good idea of what you'd like to see in a multi-lingual setup for Site Builder - I'd love to get your feedback on what you think would work best. We can definitely get a ticket open on it and investigate the work required to make it happen.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
pch
@pch
10 years ago
328 posts
Okay Brian. I understand that in the meantime, I should just forget about the site builder, It won't work for me. Sad!

Anyway, would you mind helping me on how to create a menu with child menu items in Elastic skin (not using the site builder) that will get translated when the site language changes? Same with the page Meta tag.

Thanks
brian
@brian
10 years ago
10,149 posts
Sure - try this:

- Clone the skin you want to use in the Developer Tools -> Tools -> Clone Skin section
- modify the ClonedSkin/lang/en-US.php file and add in all the language strings you want
- run the Integrity Check - this will "install" the new lang strings
- modify the ClonedSkin/header_menu_desktop.tpl file and add in your new menu options you want - you'll see a lot of other entries in there using {jrCore_lang} - the format is identical and you just use the index of the new lang strings you added to the file.

Then, once you are happy with how it looks in English, go to ACP -> Users -> Users -> Tools -> Create a Language and use en-US as your language to clone from, and whatever the new language is you want.

Then in the ACP -> Skins -> Cloned Skin -> Language tab you can select the new language and translate the strings.

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
pch
@pch
10 years ago
328 posts
I have already cloned the language. Now I have EN, ES, FR, PT and I have already started translating them.
Should I proceed with the "Clone skin" step? Will I have to clone the language twice?
brian
@brian
10 years ago
10,149 posts
pch:
I have already cloned the language. Now I have EN, ES, FR, PT and I have already started translating them.
Should I proceed with the "Clone skin" step? Will I have to clone the language twice?

No - if you have already done that, just add your new lang strings to the en-US.php file and run the integrity check and they will be added in.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
pch
@pch
10 years ago
328 posts
brian:
No - if you have already done that, just add your new lang strings to the en-US.php file and run the integrity check and they will be added in.

Great. I will proceed then let you know.

Thanks
michael
@michael
10 years ago
7,805 posts
Multilingual support will probably be added to Site Builder, its just a question of getting to it. There are many things that could still be added to Jamroom to make it better, things need to happen in phases.

Right now we are at a stage where we have a lot of things out there and we are currently consolidating so that:
* all the docs are up to date
* all the modules are bug free
* usability of the base system is good

So that we have a good platform to go forward with. When we get into a new phase of extension, then your good suggestion of multilingual Site Builder can be looked at.

It makes it easier on us if the question forum threads can be a single question, that we can answer, then mark as 'solved' and move onto the next one. :) Makes it easier for people coming along next to find the answers when they search.
pch
@pch
10 years ago
328 posts
Hi Michael,

Thanks for your reply. I have no choice. I have manually started to build a multilingual JR site. My main worry is that I will need to start everything over on the Site Builder when the Multilingual support will be added to it.

About the forum post, I can not mark it as solved right now, because it hasn't been solved for me yet. I am still applying the changes that Brian suggested me here on trying to build a multilingual site. I will post some feedback and questions about it very soon.
brian
@brian
10 years ago
10,149 posts
I've marked this as "solved" since I believe it covers the question of HOW to build a multilingual site.

Please start a new topic for any specific questions or issues you have in implementing it - that makes it easier on us to track what's going on.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags