developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 13 years ago

Last modified 12 years ago

#489 assigned enhancement

Add support for partial overloads for non-generic locales (en_US, fr_CA, ...) and overloaded locales

Reported by: Julien Owned by: Julien
Priority: normal Milestone:
Component: jelix:core:jLocale Version: 1.0.2
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

It could be very powerfull if we could only redefine 1 string for locale en_US, and let Jelix do some kind of merging whith the locale en_EN.

Same idea for overloaded locales in the "overload" directory of modules. Would be very nice to be able to overload just 1 string and not the full file.

Mix both cases and you have this : en_US (overloaded) > en_US (original) > en_EN (overloaded) > en_EN (original).

If everything fails, we have an exception like today.

Is this a good enhancement ?

I have 2 methods for doing this :

  1. trying to get the locale recursively and returning it when found.
  1. at compilation/caching time, some kind of merging is done and all files (for every locale, original or overloaded) have the full set of strings inside.

Method 2 should be more efficient in production use, because compilation/caching should only be done once, but this compilation/caching process will be more heavy. It also seems simplier to code.

Which method should I choose (please don't answer "both and we'll see" ;) )

Change History (4)

comment:1 Changed 13 years ago by Julien

  • Status changed from new to assigned

comment:2 Changed 13 years ago by laurentj

  • Component changed from jelix:core to jelix:core:jLocale

Method 2 seems better to me although I am afraid of perf issues.

comment:3 Changed 12 years ago by bballizlife

I'd prefer method 2, too, as it will have a compilation and caching process. It's better than getting locale in properties files each times. Counterpart is that the compilation/caching process could take time and ressources. But i think we can't have a perfect solution ;)

comment:4 Changed 12 years ago by laurentj

  • Milestone Jelix 1.1 beta 1 deleted
Note: See TracTickets for help on using tickets.