2013-03-04 179 views
0

我的工作我的第一的Joomla 3.0組件,所以我創造語言兩個文件夾:爲什麼語言是不是裝的?我做錯了什麼?

com_moving/language/en-GB/en-GB.ini 
com_moving/language/es-ES/es-ES.ini 

我moving.xml是這個(從com_ola_j3採取什麼地方,我發現它):

<?xml version="1.0" encoding="utf-8"?> 
<extension type="component" version="3.0" method="upgrade"> 
    <name>COM_MOVING</name> 
    <creationDate>Marzo 2013</creationDate> 
    <author>Reynier Perez Mira</author> 
    <authorEmail>[email protected]</authorEmail> 
    <authorUrl>http://www.reynierpm.com</authorUrl> 
    <copyright>Copyright (C) 2013 Reynier Perez Mira. Derechos reservados.</copyright> 
    <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license> 
    <version>1.0</version> 
    <description>COM_MOVING_DESCRIPTION</description> 
    <scriptfile>script.php</scriptfile> 

    <install> <!-- Runs on install --> 
     <sql> 
      <file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file> 
     </sql> 
    </install> 
    <uninstall> <!-- Runs on uninstall --> 
     <sql> 
      <file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file> 
     </sql> 
    </uninstall> 

    <!-- Site Main File Copy Section --> 
    <!-- Note the folder attribute: This attribute describes the folder 
    to copy FROM in the package to install therefore files copied 
    in this section are copied from /site/ in the package --> 
    <files folder="site"> 
     <filename>index.html</filename> 
     <filename>moving.php</filename> 
     <filename>controller.php</filename> 
     <folder>views</folder> 
     <folder>models</folder> 
     <folder>language</folder> 
    </files> 

    <media destination="com_moving" folder="media"> 
     <filename>index.html</filename> 
     <folder>images</folder> 
    </media> 

    <languages folder="site"> 
     <language tag="en-GB">language/en-GB/en-GB.com_moving.ini</language> 
     <language tag="es-ES">language/es-ES/es-ES.com_moving.ini</language> 
    </languages> 

    <administration> 
     <!-- Administration Menu Section --> 
     <menu img="../media/com_moving/images/tux-16x16.png">COM_MOVING_MENU</menu> 
     <!-- Administration Main File Copy Section --> 
     <!-- Note the folder attribute: This attribute describes the folder 
     to copy FROM in the package to install therefore files copied 
     in this section are copied from /admin/ in the package --> 
     <files folder="admin"> 
      <!-- Admin Main File Copy Section --> 
      <filename>index.html</filename> 
      <filename>config.xml</filename> 
      <filename>access.xml</filename> 
      <filename>moving.php</filename> 
      <filename>controller.php</filename> 
      <!-- SQL files section --> 
      <folder>sql</folder> 
      <!-- tables files section --> 
      <folder>tables</folder> 
      <!-- models files section --> 
      <folder>models</folder> 
      <!-- views files section --> 
      <folder>views</folder> 
      <!-- controllers files section --> 
      <folder>controllers</folder> 
      <!-- helpers files section --> 
      <folder>helpers</folder> 
     </files> 

     <languages folder="admin"> 
      <language tag="en-GB">language/en-GB/en-GB.com_moving.ini</language> 
      <language tag="en-GB">language/en-GB/en-GB.com_moving.sys.ini</language> 
      <language tag="es-ES">language/es-ES/es-ES.com_moving.ini</language> 
      <language tag="es-ES">language/es-Es/es-ES.com_moving.sys.ini</language> 
     </languages> 
    </administration> 
</extension> 

當我去擴展>擴展管理器>發現我沒有得到該組件的名字,我剛剛得到「COM_MOVING」爲什麼呢?我做錯了什麼?

+0

語言的名字是'com_moving /語言/ EN-GB/EN-GB.ini',而不是'com_moving /語言/ EN-GB/EN-GB.com_moving.ini',你還需要一個文件' EN-GB.com_moving.sys.ini',加什麼大衛說有關管理方面的文件 – 2013-03-04 08:47:15

回答

1

你應該有兩個獨立的語言集。一個用於管理方和一個用於網站(前端)。總計,這四個文件應該在以下位置:

com_moving/admin/language/en-GB/en-GB.ini 
com_moving/admin/language/es-ES/es-ES.ini 

com_moving/site/language/en-GB/en-GB.ini 
com_moving/site/language/es-ES/es-ES.ini 

您可以在XML文件看到這有兩種不同的語言的聲明和每一個指定的文件夾。您的文件夾中