[Owncloud] Subclassing OC_L10N

Frank Karlitschek frank at owncloud.org
Mon May 28 19:17:34 UTC 2012


Hi Thomas,

sounds interesting. What kind of templating are you working on?


Frank


On 28.05.2012, at 21:15, Thomas Tanghus <thomas at tanghus.net> wrote:

> Does anyone object to me committing the patch below?
> I'm working on an app that provides a alternative page template system, and 
> this patch would allow me to create a subclass of OC_L10N instead of rewriting 
> it.
> Alternatively I could make $translations and $localizations protected instead 
> of private.
> 
>  diff --git a/lib/l10n.php b/lib/l10n.php
>  index c0ecdbd..d28caf8 100644
>  --- a/lib/l10n.php
>  +++ b/lib/l10n.php
>  @@ -77,6 +77,10 @@ class OC_L10N{
>           * language.
>           */
>          public function __construct($app, $lang = null){
>  +               $this->init($app, $lang);
>  +       }
>  +
>  +       protected function init($app, $lang = null){
>                  // Find the right language                                                                                                                                          
>                  if(is_null($lang)){   
> 
> -- 
> Med venlig hilsen / Best Regards
> 
> Thomas Tanghus
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud




More information about the Owncloud mailing list