Announcement

  •  » Engine
  •  » All languages children of en_UK

#1 2014-02-03 22:02:31

flop25
Piwigo Team
2006-07-06
7037

All languages children of en_UK

Hello

It's been a long time I have a problem with the current system of translation: it's about translating long texts. Putting the text as a key for the array is a non-sens for me, and unfortunately if the translation key doesn't exist for a language, the value of the key is displayed. So for texts, it displays "explanation_1" for instance.
That's the problem

I would like to solve it by saying every languages are children of en_UK, as an ultimate fall-back, in order to display something correct


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#2 2014-02-03 22:06:37

rvelices
Former Piwigo Team
2005-12-29
1960

Re: All languages children of en_UK

IMHO, I disagree including a lot of very long php (it takes time parsing) when it is not required ...

Offline

 

#3 2014-02-03 22:12:46

flop25
Piwigo Team
2006-07-06
7037

Re: All languages children of en_UK

so would it be technically possible using an other way less resource consuming?


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#4 2014-02-12 16:11:13

flop25
Piwigo Team
2006-07-06
7037

Re: All languages children of en_UK

Ok, I have an other idea -which I had some days ago-:
using the existing function set_languagefilename-trucmuche to add other languages files -with a standardize name for the translation tool?- and a parameter to say 'include the En file also for this one' in order to avoid the inclusion of big files.
So to summarize, fragmentation of files using big paragraphes/long text


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#5 2014-02-12 16:56:30

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: All languages children of en_UK

an example please ?

is this something like that you want ?

Code:

load_language('short_sentences.lang', PLUGIN_PATH);

load_language('long_sentences.lang', PLUGIN_PATH, array('always_load_en'=>true));

Offline

 

#6 2014-02-12 17:02:12

flop25
Piwigo Team
2006-07-06
7037

Re: All languages children of en_UK

mistic100 wrote:

an example please ?

is this something like that you want ?

Code:

load_language('short_sentences.lang', PLUGIN_PATH);

load_language('long_sentences.lang', PLUGIN_PATH, array('always_load_en'=>true));

yes exactly!

sry for the non precision


As an example, the long sentences would be for help texts: in plugins -my futur plugin Take A Tour for instance, but also I have included How To in some of my other plugins- and maybe in the core to avoid those .html horrible pop-ups


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#7 2014-02-12 17:07:56

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: All languages children of en_UK

I think it's the better solution we could get

[Bugtracker] ticket 3046

Offline

 

#8 2014-07-02 10:13:54

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: All languages children of en_UK

Done, the option is named "force_fallback"
if "true" it falls the the default gallery language (homogeneous with "no_fallback")
typically you will want to set it to "en_UK"

Offline

 

#9 2014-07-02 10:25:10

flop25
Piwigo Team
2006-07-06
7037

Re: All languages children of en_UK

<3
Thx


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 
  •  » Engine
  •  » All languages children of en_UK

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact