I writed a component for joomla I want use more than once language.Ex english & Itatly But i don't know how to do it. Use component joomfish but only effect with component exsist on this joomla version, not effect with my component ? How to config my component ?
+1
A:
You don't need Jomfish, Joomla has this capability inside.
You need to use JText and language files.
Step 1: Instead of echo 'Hello'
use echo JText::_('COM_EXAMPLE_HELLO')
Step 2: Create a file language/en-GB/en-GB.com_example.ini
Step 3: In the ini file, enter COM_EXAMPLE_HELLO=Hello
Step 4: In the installer XML, don't forget the language ini file: http://docs.joomla.org/Components:xml_installfile
GDR
2010-05-12 08:31:44
thanks for answer, a question:JText::_('abc');in *.iniabc=123;ABC=456;when change language will get 456 ? why not 123 ?
Chameron
2010-05-13 02:30:20
I guess it's a question to Joomla devs - http://groups.google.com/group/joomla-dev-cms
GDR
2010-05-18 11:23:17