[Owncloud] Translating the Navigation entry of an app

Victor Dubiniuk victor.dubiniuk at gmail.com
Thu Dec 20 21:47:42 UTC 2012


Hi George,

it's just a guess but I think appid should be in lowercase:

$l=OC_L10N::get('notes');



---
Victor

On Thu, Dec 20, 2012 at 10:51 PM, George Ruinelli <george at ruinelli.ch>wrote:

> Hi all
>
> I am trying to figure out how I can provide a translated version of my apps
> name on the left side in the OwnCloud navigation.
>
> I created a translation file de.php in l10n which contains all needed
> strings:
> ------------------------------
> <?php $TRANSLATIONS = array(
> "Notes" => "Notizen",
> "Add Note" => "Notiz hinzufügen",
> ...
> );
>
>
> In appsinfo/apps.php, I have the following:
> ------------------------------
> <?php
> $l=OC_L10N::get('Notes');
>
> OCP\App::addNavigationEntry( array(
>   'id' => 'notes_index',
>   'order' => 11,
>   'href' => OCP\Util::linkTo( 'notes', 'index.php' ),
>   'icon' => OCP\Util::imagePath( 'notes', 'icon.png' ),
>   'name' => $l->t('Notes'))
> );
> ------------------------------
>
> The texts in the app itself get translated, how ever the apps name in the
> navigation stays in the original language.
> If somebody wants to test it, simply install
> http://apps.owncloud.com/content/show.php/Notes?content=155599 and switch
> the
> language to German.
>
> Thanx for any hints
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20121221/9c715c82/attachment.html>


More information about the Owncloud mailing list