Search…

X3 Photo Gallery Support Forums

Search…
 
dark-rebel
Experienced
Topic Author
Posts: 24
Joined: 17 Feb 2015, 15:50

Dual language with X3?

02 Feb 2016, 12:38

Hi,

is there a way to realize two language with the setup of one X3 gallery?

I know an alternative would be using 2 single installations with a subdomain eg. en.XXX.com or de.XXX.com but then you would have double efford for maintaining the content.
Just in case i would go that way, would be there a chance to make a language link / flag in the installation (eg. header) to switch between the languages?

Thanks

Stefan
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Dual language with X3?

03 Feb 2016, 01:02

It's a good question, and although we would really like to have a multi-language feature, it comes with too many technical complications. Allow me to summarize:

# Exactly how would you be adding multiple languages? For EVERY text-input field in the panel page-settings, it would require us to have multiple fields. For example:
Code
title_en
title_de
title_fr
description_en
description_de
description_fr
content_en
... so on ...
Clumsy at best.

# Then of course, we would need to rip X3 config apart, because we can't just access a variable page.title any more, we would need to access something like page["title_"+language]. Page settings, instead of containing a persistent structure, would have to be filled with multiple language-specific, duplicated items.

# Then, you would need a custom languages-configurator to setup what languages you want to use. All the input fields would then need to get duplicated in the panel depending on what languages you set to use.

# You would need some kinda specific urls for each language /en/, /de/, /fr/ etc. This would require us to somehow create a system, depending on mod_rewrite, that creates pages from the SAME page/folder in X3, but reads in different language files.

# It crashes head-on with caching-system logic, which is necessary to make X3 websites run fast on shared servers. If the language is to be dynamic for the same pages, it would need to re-render templates from the PHP/backend, making output slow.

---

Of course, as a user, you are understandably not concerned with technical issues and challenges of the application. It's a fair request, but the summary above are reasons why this is not priority for now. We may look into it in the future, but likely alongside a new PHP platform.
 
User avatar
correiax
Experienced
Posts: 41
Joined: 17 Dec 2013, 21:33

Re: Dual language with X3?

08 Mar 2016, 16:54

Hi
Im now dealing with the same question. the current option would be having a duplicated installation, but this can become tedious and lead to desynchronizing updates.

I think there are various ways to avoid affecting the performance while adding this functionality.
instead of creating the duplication in one set of variables , classes or functions containing the information could be used instead.

example:
If language EN is selected then only EN_classes would be loaded (this wont affect performance because the other languages classes wouldn't be load. performance would/ should be exactly the same)

class-EN:
title_EN
description_EN
...

class-DE
title_EN
description_EN
...

load class_EN

This could be applied for 100 different languages. each one behaving as a container for (title, label...etc..)
please take this as a suggestion as Im not a programmer but I believe the concept could work.

There is another advantage here, the most heavy loads*photos dont require duplication as they are the same.
this would just apply for titles, labels, texts

Regards!
RC
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Dual language with X3?

09 Mar 2016, 00:19

correiax wrote:...
I am not quite sure what you mean by language classes. If there was multiple language, it would still use the same native functions, that is not the problem. Unfortunately, this is not priority in X3 because it simply hogs down a clean and effective system, and I can only quote my last post which has not been referred to in your post.
mjau-mjau wrote:# Exactly how would you be adding multiple languages? For EVERY text-input field in the panel page-settings, it would require us to have multiple fields. For example:
Code
title_en
title_de
title_fr
description_en
description_de
description_fr
content_en
... so on ...
Clumsy at best.

# Then of course, we would need to rip X3 config apart, because we can't just access a variable page.title any more, we would need to access something like page["title_"+language]. Page settings, instead of containing a persistent structure, would have to be filled with multiple language-specific, duplicated items.

# Then, you would need a custom languages-configurator to setup what languages you want to use. All the input fields would then need to get duplicated in the panel depending on what languages you set to use.

# You would need some kinda specific urls for each language /en/, /de/, /fr/ etc. This would require us to somehow create a system, depending on mod_rewrite, that creates pages from the SAME page/folder in X3, but reads in different language files.

# It crashes head-on with caching-system logic, which is necessary to make X3 websites run fast on shared servers. If the language is to be dynamic for the same pages, it would need to re-render templates from the PHP/backend, making output slow.

---

Of course, as a user, you are understandably not concerned with technical issues and challenges of the application. It's a fair request, but the summary above are reasons why this is not priority for now. We may look into it in the future, but likely alongside a new PHP platform.
 
User avatar
correiax
Experienced
Posts: 41
Joined: 17 Dec 2013, 21:33

Re: Dual language with X3?

09 Mar 2016, 17:26

Hi
I believe this can become technically challenging and my suggestion should be taken as a concept/ approach.
a more practical and known example is the address book application:
it contains one field for Name one field for Surname etc... that is then populated with data from selected contact/person, in X3 represented by the selected language. *there is no field duplication for each contact person.
in case of X3 this wouldn't be so simple... :shock: :shock:

example of multi language photo gallery : http://www.bilderbank.de/
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Dual language with X3?

10 Mar 2016, 00:08

Yes. This wordpress-website is using the extensive https://wpml.org/ multi-language wordpress plugin, which is premium (costs money), and has been in development from a team for more than 10 years? It is also built ON TOP of the Wordpress CMS, which runs from a database (X3 does not). Add to the fact that X3 has a much more advanced frontend including ajax, mega menus, dozens of layouts methods, which all would need to prepare for multiple languages ... not a small job to put it mildly.

Then see what we would need to do for the admin panel to make it possible:
Image
Image
Image
Image

My only point is, it is so clumsy technically and logically, that this will not be considered in the near-future. We may consider it later in 2016, but it would have to be a "light" solution.
 
User avatar
correiax
Experienced
Posts: 41
Joined: 17 Dec 2013, 21:33

Re: Dual language with X3?

10 Mar 2016, 05:02

yes this isn't a simple task definitely! :shock: :shock:

but I could use a duplicated X3 to set with different languages right? :?:
using a "welcome-page" for language/gallery selection :

Page pointing two X3 Galleries
www.xpto.com/welcome.htm

1: X3_EN
www.xpto.com/X3_EN

2: X3_PT
www.xpto.com/X3_PT

would be this best approach for being practical with this issue on X3 currently?
:idea:
Thanks!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Dual language with X3?

10 Mar 2016, 08:45

correiax wrote:would be this best approach for being practical with this issue on X3 currently?
Yes, this would work 100%. As you clearly understand already though, it would require cross-management of two entirely separate installations of X3, including upload- and creation pages.

You could do as suggested, or something like this:

xpto.com
From here, you could either have a SPLASH page with language-selector, or simply redirect to your default language version.

xpto.com/en
You could just use /en/ folder for language ... not really necessary to use /X3_EN/

xpto.com/pt
Same for other languages, just use the short-term pt.

So yes, for the visitor this will work perfectly. It only requires more work from you to synchronize the creation of pages/images across two (or more) technically separate websites.
 
User avatar
correiax
Experienced
Posts: 41
Joined: 17 Dec 2013, 21:33

Re: Dual language with X3?

10 Mar 2016, 16:20

Language issue resolved!
Thanks! :mrgreen: