[prev in list] [next in list] [prev in thread] [next in thread] 

List:       owncloud
Subject:    Re: [Owncloud] Translating the Navigation entry of an app
From:       Victor Dubiniuk <victor.dubiniuk () gmail ! com>
Date:       2012-12-20 21:47:42
Message-ID: CA+UHsBt6FB3TrrwP0=Nrr-LzUB2mQ+myP5ntgK-QuwtGwZ+9mA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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@kde.org
> https://mail.kde.org/mailman/listinfo/owncloud
>

[Attachment #5 (text/html)]

Hi George,<div><br></div><div>it&#39;s just a guess but I think appid should be in lowercase: \
</div><div><br></div><div>$l=OC_L10N::get(&#39;notes&#39;);</div><div><br></div><div><br></div><div><br></div><div>---</div><div>
 Victor<br><br><div class="gmail_quote">On Thu, Dec 20, 2012 at 10:51 PM, George Ruinelli <span \
dir="ltr">&lt;<a href="mailto:george@ruinelli.ch" \
target="_blank">george@ruinelli.ch</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Hi all<br>
<br>
I am trying to figure out how I can provide a translated version of my apps<br>
name on the left side in the OwnCloud navigation.<br>
<br>
I created a translation file de.php in l10n which contains all needed strings:<br>
------------------------------<br>
&lt;?php $TRANSLATIONS = array(<br>
&quot;Notes&quot; =&gt; &quot;Notizen&quot;,<br>
&quot;Add Note&quot; =&gt; &quot;Notiz hinzufügen&quot;,<br>
...<br>
);<br>
<br>
<br>
In appsinfo/apps.php, I have the following:<br>
------------------------------<br>
&lt;?php<br>
$l=OC_L10N::get(&#39;Notes&#39;);<br>
<br>
OCP\App::addNavigationEntry( array(<br>
  &#39;id&#39; =&gt; &#39;notes_index&#39;,<br>
  &#39;order&#39; =&gt; 11,<br>
  &#39;href&#39; =&gt; OCP\Util::linkTo( &#39;notes&#39;, &#39;index.php&#39; ),<br>
  &#39;icon&#39; =&gt; OCP\Util::imagePath( &#39;notes&#39;, &#39;icon.png&#39; ),<br>
  &#39;name&#39; =&gt; $l-&gt;t(&#39;Notes&#39;))<br>
);<br>
------------------------------<br>
<br>
The texts in the app itself get translated, how ever the apps name in the<br>
navigation stays in the original language.<br>
If somebody wants to test it, simply install<br>
<a href="http://apps.owncloud.com/content/show.php/Notes?content=155599" \
target="_blank">http://apps.owncloud.com/content/show.php/Notes?content=155599</a> and switch \
the<br> language to German.<br>
<br>
Thanx for any hints<br>
_______________________________________________<br>
Owncloud mailing list<br>
<a href="mailto:Owncloud@kde.org">Owncloud@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/owncloud" \
target="_blank">https://mail.kde.org/mailman/listinfo/owncloud</a><br> \
</blockquote></div><br></div>



_______________________________________________
Owncloud mailing list
Owncloud@kde.org
https://mail.kde.org/mailman/listinfo/owncloud


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic