You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think com_mywalks should be COM_MYWALKS or you can use COM_MYWALKS_MENU if you add the translation.
I have am just getting into building a new Joomla component again but I have looked into the installer quite a lot. If you look at my XML example (still making changes) I have tried to add all the features it does and especially add the translations where possible. Also the <element> tag is referenced on the manfiest page.
<element> – the internal name of the component. If omitted, name will be cleaned and used
For this particular issue if you look a the top of my you will see
<name>com_qwhelloworld</name><!-- Translating this is optional -->
<element>com_qwhelloworld</element><!-- This is not really needed, but overides component destination -->
I am toying with the idea of changing it to the following format, but I need to experiment because Component <name> fields are not properly translated
<name>COM_QWHELLOWORLD</name><!-- Translating this is optional -->
<element>com_qwhelloworld</element><!-- This is not really needed, but overides component destination -->
As you can see in the examples above from #__extensions, modules and plugins '<name'> field can be translated with no issue even though lots of people do not bother :( but the components are either in com_mywalks or COM_MYWALKS format.
When the <name> field is used on its own, it is this reference that you will see in the database and not its translation. It does not matter for the JText:: routines if it is lowercase or uppercase, I think this is also used for Joomla to know where to put it (again i need to experiment). When <element> is present Joomla, it uses this to decide where to put the component etc.. and overrides the <name> field for this purpose but it is not used for translation, the <name> field carries that torch. I think this is why there is an <element> field to allow translation seperate from locating the component. The <name> field in modules and plugins are fully translatable because they have a different method of knowing where to install.
Noted all this. I have been using com_banners as a model of how it should be done. Plus, I read somewhere that, by convention, the name field is in lower case.
keep an eye out on that Github issue above I posted as I dont think having them all lowercase is actually correct. It is something that has been overlooked because things still work. Basically JTEXT is case insensitive even though you write translatable strings in upper case. This os the reson for the <element> tag that no-one uses.
@ceford I see you just made a change to the xml
p.s. I hope this is not too long.
I think
com_mywalks
should beCOM_MYWALKS
or you can useCOM_MYWALKS_MENU
if you add the translation.I have am just getting into building a new Joomla component again but I have looked into the installer quite a lot. If you look at my XML example (still making changes) I have tried to add all the features it does and especially add the translations where possible. Also the
<element>
tag is referenced on the manfiest page.For this particular issue if you look a the top of my you will see
I am toying with the idea of changing it to the following format, but I need to experiment because Component
<name>
fields are not properly translatedAs you can see in the examples above from #__extensions, modules and plugins '<name'> field can be translated with no issue even though lots of people do not bother :( but the components are either in
com_mywalks
orCOM_MYWALKS
format.When the
<name>
field is used on its own, it is this reference that you will see in the database and not its translation. It does not matter for the JText:: routines if it is lowercase or uppercase, I think this is also used for Joomla to know where to put it (again i need to experiment). When<element>
is present Joomla, it uses this to decide where to put the component etc.. and overrides the<name>
field for this purpose but it is not used for translation, the<name>
field carries that torch. I think this is why there is an<element>
field to allow translation seperate from locating the component. The<name>
field in modules and plugins are fully translatable because they have a different method of knowing where to install.maybe joomla should add
The text was updated successfully, but these errors were encountered: