site Article frontend submit set default language
Testing instructions
monolingual site where back-end language English UI is used for the back-end part as default language
frontend language French
monolingual site where French UI is used for the site part as default language
Create menu item to set to use category and its subcategories and several other categories, but not all categories.
Let users submit articles from frontend only in French language
The problem is we get these options: All, English, French. And default is shown as All.
We want to see default language French as in this picture, but we get All.
Maybe someone knows where is this code ? In what file ? What line?
(What code makes default All, or French or English?)
new j3.24 site, default Protostar template
Labels |
Added:
?
|
Where is your forum post?
administrator/index.php?option=com_languages&view=installed
and make sure that you have set French as the default language for the admin and english as the default language for the siteJob done
English for admin and French for site ;)
Also, once done , the language chosen in the Create article menu item is totally useless and will have no impact on your site.
Then if you want your users to NOT be confused, make an override of /components/com_content/views/form/tmpl/edit.php
Modify
<?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'language', JText::_('JFIELD_LANGUAGE_LABEL')); ?>
<?php echo $this->form->renderField('language'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
with
<?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'language', JText::_('JFIELD_LANGUAGE_LABEL')); <?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'language', JText::_('JFIELD_LANGUAGE_LABEL')); ?>
<?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'language', JText::_('JFIELD_LANGUAGE_LABEL')); ?>
<?php $this->form->setFieldAttribute('language', 'default', 'fr-FR'); ?>
<?php $this->form->setFieldAttribute('language', 'readonly', true); ?>
<?php echo $this->form->renderField('language'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php $this->form->setFieldAttribute('language', 'readonly', true); ?>
<?php echo $this->form->renderField('language'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
Language switcher site module is not created, do we need to create it ? and then unpublish?
It is set english as the default language for the admin and French as the default language for the site
I see:
Language Code is unpublished, do we need to enable it?
Language Filter is unpublished
Also I see Content languages
English is unpublished
French is published
Use forums
https://forum.joomla.org/viewforum.php?f=711
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-02-26 13:45:51 |
Closed_By | ⇒ | drmenzelit |
Closing this as it is not a bug. Feel free to ask for help in the forum.
Maybe we should update documentation on this , because no answer in forum.