9

Joomla has a certain method for this. First, in view.html.php add all strings, what needs to be translated with this: JText::script('VALIDATION_ERROR'); This will add your string to javascript object, what you can use later. And in javascript, use: Joomla.JText._('VALIDATION_ERROR') Which will give you matching translation in current language. This way ...


6

You can use JLanguageAssociations::getAssociations. This function will return an array containing associated items. You can also check if if the language filter Items Associations parameter is enabled using JLanguageAssociations::isEnabled();. Here's an example from ROOT/administrator/components/com_content/models/article.php: // Load associated content ...


6

Add further abstraction. JText::sprintf('COM_MYCOMPONENT_DATETIME_AGO', $num, JText::_('SHOUT_TIME'), JText::_('SHOUT_AGO')); English language COM_MYCOMPONENT_DATETIME_AGO="%1$s %2$s %3$s" German language COM_MYCOMPONENT_DATETIME_AGO="%3$s %1$s %2$s"


5

Hope this can help you. You need to create a Languaje Content entry for your language. Go to Extensions->Language Manage -> Content And create a new record as shown in the picture In order to get the flag I created a new gif file fo.gif and uploaded to media/mod_languages/images Here is it if you need it


5

You can use this language plugin: http://extensions.joomla.org/extension/easy-language Once installed in your article you can do: {lang en}Monday{/lang}{lang es}Lunes{/lang} It will display the text on the selected languaje. Hope it work for you


4

There is no need to set non-friendly SEF URLs. I have a multilingual website too and I had your same problem. Do as following: Go to Plugins -> Language Filter and set Yes to: Remove the prefix from default language. Hope it helps :)


4

I am making a guess here, as I can't really test this right now and I am not entirely sure I understood what you want correctly, but this should be in the correct general direction. define( '_JEXEC', 1 ); define( 'JPATH_BASE', $_SERVER["DOCUMENT_ROOT"]); require_once ( JPATH_BASE '/includes/defines.php' ); require_once ( JPATH_BASE '/includes/framework.php'...


4

Actually the language siwtcher module gets the flags images from the directory /media/mod_languages/images We can define which image should be used for each language, when creating/editing the Content Languages in Language Manager, through the Image Prefix selection. According to the instructions that appear when hovering the field: Prefix of the ...


4

You can easily create an override of that module from Template Manager, as explained here: http://docs.joomla.org/J3.x:How_to_use_the_Template_Manager#Creating_Overrides Just go into the "override" tab and click con "mod_language" on the modules list. You'll get lang switcher overrideable file added to your template's HTML folder (inside a mod_language ...


4

This is indeed a bug and has been fixed here: https://github.com/joomla/joomla-cms/pull/7427 The fix will be available in Joomla 3.4.4 If you need a quick fix now, see my comment above.


4

The problem is I need to keep the language files inside en-GB folder <languages> <language tag="en-GB">language/en-GB/en-GB.mod_quickwrk.ini</language> <language tag="en-GB">language/en-GB/en-GB.mod_quickwrk.sys.ini</language> </languages> :-)


4

Look for methods called set<PROPERTY>Callback on the same API documentation you linked. E.g. to override the lower limit use Joomla\CMS\Language\Language::setLowerLimitSearchWordCallback(). I'm not meant to touch /language/en-GB/en-GB.localise.php, right? Correct. This should be done in a system plugin: defined('_JEXEC') or die; use Joomla\CMS\...


3

I haven't been able to reproduce your error, but you can remove the language code from the Language Filter Plugin by setting "Remove URL Language Code to YES. That will remove the /es/ or /en/ part from your URL. You can also use absolute paths in the component with the JURI::root() string: <img src="<?php echo 'JURI::root()'; ?>images/loader.gif"&...


3

You only have to add the additional languages to the XML installer of your extension. For example: <?xml version="1.0" encoding="utf-8"?> <extension type="component" version="2.5.0" method="upgrade"> ... <!-- Front end translation files --> <languages folder="language/frontend"> <language tag="en-GB">en-GB/en-...


3

You can uninstall them. Joomla! finds language files by folder and file name, so publish status is never checked. This is because a file check is usually much faster than a database lookup. Manifest scripts also only cover install and uninstall AFAIK. You could of course make a system plugin that checked the publish status and disabled or enabled the files ...


3

According to https://stackoverflow.com/questions/662923/extract-lang-value-using-javascript you can use document.documentElement.lang


3

Yes, it's possible using language overrides. In your admin area, go to Extensions -> Language(s), and select Overrides in the left menu. Make sure you select the desired language in the "Filter" drop down. Click "New" to create a new override. In the search field, type COM_USERS_PROFILE_NAME, and set "Search for" to "Constant". You should see something ...


3

As far as I know what you want isn't possible. The /en/ is needed so Joomla knows that you want to change the language. Because with www.example.com/company/contact.html Joomla would look in your language cookie and redirect to the currently active language. So for changing languages, you need to explicitely tell Joomla that you want to switch to english. ...


3

I FOUND THE SOLUTION!!! Temporary change menu item type to Text Separator, modify alias to your liking and change type back to External URL. REFERENCE:http://www.mysysadmintips.com/other/web/285-remove-date-and-time-from-joomla-menu-link-url Thanks to all for the help. ;)


3

Usually you would use "onContentBeforeSave" function of content-type plugin, but for some reason com_languages doesn't launch "onContentBeforeSave" and "onContentAfterSave" events. However there is another option. A bit more ugly, using system plugin and onAfterRoute event. First at all, we need XML file with some info about plugin (required by Joomla! ...


3

Instead of overwriting or modifying the JText class why not just write a function call function in your model that retrieves your translation from the database and return the string? Echo the string in your view after including your model: //INCLUDE AT THE TOP OF THE LAYOUT FILE $mymodel= JModelLegacy::getInstance('ViewName','MyComponentNameModel'); //...


3

There are a couple of ways to deal with this. 1. Create a German language ini file for your template. a. Go to languages folder -> EN-GB b. Spot your template's EN-GB language file: e.g. en-GB.tpl_theme1498.ini c. Copy it into the de-DE language folder. d. Rename it to de-DE.tpl_theme1498.ini (or whatever is the theme1498 naming). e. Edit it ...


3

Since Joomla 3.1 it is not necessary to expand the constructor any more, like farahmand's answer. You can easily write / set the $autoloadLanguage like class myPlugin extends JPlugin { /** * Load the language file on instantiation. * * @var boolean * @since 3.1 */ protected $autoloadLanguage = true; ...


3

The language files are loaded again (from their source) on each page load. You don't need to reinstall the component each time. Are you writing to the right file?


3

This is the title of the Module - that is hand-written and editable. You can write anything you want on it. If you go to the Modules' Manager, you will be able to find this module - click to edit it and you can type anything as the Module's Title. You can even hide the title from showing. Actually, for multilingual sites, the Joomla!-core approach is to ...


3

JROOT is not a valid path constant. Change it to JPATH_ROOT. Or use JPATH_ADMINISTRATOR instead of JROOT . DS . 'administrator'


3

Your language files are not loaded. Load them with Joomla\CMS\Language\Language::load(). This example loads administrator/language/en-GB/en-GB.com_content.ini file: $app = JFactory::getApplication('site'); $app->initialise(); $app->getLanguage()->load('com_content', JPATH_ADMINISTRATOR);


2

Joomla is an excellent system for multilingual websites, once it's correctly set up. No 3rd party extensions are required. But the configuration is not always intuitive (although recent versions of Joomla can be automatically configured during installation). Here's a short guide on how to get all pieces together: 1. Install languages Any language you want ...


2

The admin menu is an administrator module. It uses language constants for its menu items. To see what language constants it uses for each of its menu items, you can check the module's code in the module's template folder /administrator/modules/mod_menu/tmpl/ For example you will see CONSTANTS like : MOD_MENU_CONFIGURATION MOD_MENU_CONTROL_PANEL ...


2

May be you have module layout overrides? I've just tested it on my website and ordering is working as expected - by the ordering in the Language Manager.


Only top voted, non community-wiki answers of a minimum length are eligible