Advertisement

Problem with language file in advanced search module Topic is solved

General questions regarding the use of languages in Joomla! 5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
rloeffler
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Apr 10, 2024 11:07 am

Problem with language file in advanced search module

Post by rloeffler » Tue Feb 11, 2025 8:29 pm

Hello Joomla community,

i have a problem with the Languagefile in Advanced Search module.

I use:
Joomla 5.2.3
German Laguage File 5.2.3.1
The frontend and backend language is set to German.
Template: Helix Ultimate

Problem description:
I use the advanced search on a page.
In the frontend, the text in the upper field of the advanced search module is displayed in English, the rest of the module is German.

The hint box shows this text:
Entering this and that into the search form will return results containing both "this" and "that".
Here are a few examples of how you can use the search feature:
Entering this not that into the search form will return results containing "this" and not "that".
Entering this or that into the search form will return results containing either "this" or "that".
Search results can also be filtered using a variety of criteria. Select one or more filters below to get started.
Entering "this and that" (with quotes) into the search form will return results containing the exact phrase "this and that".


This exact text is always displayed in English, but should be German.

I checked the language files, the German language files are there and contain the correct text.

I've tried using overrides, but these aren't displayed either. No matter what I try, I only see the English text in the hint field.

You can see it here: https://www.fotogilde-tailfingen.de/com ... Itemid=101

Can anyone give me a tip on what else I can do or where the error could be.

Thank you in advance.
Roland

Advertisement
User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28322
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Problem with language file in advanced search module

Post by imanickam » Wed Feb 12, 2025 6:50 am

Interesting... I tested the Smart Search in a test site with German (de-DE) as the Site Language and following is the outcome.
Screenshot_Smart_Search_in-German.jpg
As you may notice, the description of the Advanced Search is displayed in German.

The language strings in question are as follows. These strings are taken from the German (de-DE) language file com_finder.ini that is located in the directory \language\de-DE.

Code: Select all

COM_FINDER_ADVANCED_TIPS_AND="<p>Die Eingabe von <span class='term'>„dies und das“</span> in das Suchfeld zeigt alle Ergebnisse, die beide Wörter, „dies“ und „das“ enthalten.</p>"
COM_FINDER_ADVANCED_TIPS_INTRO="<p>Einige Beispiele zur Benutzung der Suche mit logischen Operatoren:</p>"
COM_FINDER_ADVANCED_TIPS_NOT="<p>Die Eingabe von <span class='term'>„dies nicht das“</span> zeigt alle Ergebnisse, die „dies“, aber nicht „das“ enthalten.</p>"
COM_FINDER_ADVANCED_TIPS_OR="<p>Die Eingabe von <span class='term'>„dies oder das“</span> zeigt alle Ergebnisse, die entweder „dies“ oder „das“ enthalten.</p>"
COM_FINDER_ADVANCED_TIPS_OUTRO="<p>Suchergebnisse können auch nach verschiedenen Kriterien gefiltert werden. Um zu beginnen, einen oder oder mehrere Filter auswählen.</p>"
COM_FINDER_ADVANCED_TIPS_PHRASE="<p>Die Eingabe von <span class='term'>„dies und das“</span> (mit Anführungszeichen) zeigt alle Ergebnisse, die genau die Wortfolge „dies und das“ enthalten.</p>"
Note: The testing was done with the template Cassiopeia

It looks like the language strings have not been decoded properly. In the Global Configuration, set the Language Debug On. With the debug on, you would notice what language files are loaded. You may find a clue in that output.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

User avatar
ceford
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3097
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Problem with language file in advanced search module

Post by ceford » Wed Feb 12, 2025 6:57 am

I cannot reproduce this problem. When I switch to German the text you quoted is in German. It is generated on lines 67 to 70 of components/com_finder/tmpl/search/default_form.php. You may have a template override. Check for that and then check this source file. I guess it is also possible you may have a language override.

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28322
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Problem with language file in advanced search module

Post by imanickam » Wed Feb 12, 2025 7:23 am

It does look like a template override issue. The reason being, the order of the language string to appear would be:

COM_FINDER_ADVANCED_TIPS_INTRO
COM_FINDER_ADVANCED_TIPS_AND
COM_FINDER_ADVANCED_TIPS_NOT
COM_FINDER_ADVANCED_TIPS_OR
COM_FINDER_ADVANCED_TIPS_PHRASE
COM_FINDER_ADVANCED_TIPS_OUTRO


Whereas the order shown is:

COM_FINDER_ADVANCED_TIPS_AND
COM_FINDER_ADVANCED_TIPS_INTRO
COM_FINDER_ADVANCED_TIPS_NOT
COM_FINDER_ADVANCED_TIPS_OR
COM_FINDER_ADVANCED_TIPS_PHRASE
COM_FINDER_ADVANCED_TIPS_OUTRO
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

rloeffler
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Apr 10, 2024 11:07 am

Re: Problem with language file in advanced search module

Post by rloeffler » Thu Feb 13, 2025 3:40 pm

Thanks for your responses.

1. I have already compared the language files beforehand. The order of the language strings is the same in both files. What role does the order of the language strings play, is it important? I have adjusted them in the German language file according to the mentioned order.

Even changing the order did not improve anything.

2. I enabled the debug mode for languages and checked. For com_finder, this path is displayed: /language/de-DE/com_finder.ini

3. I have created only one override entry, which is HELIX_ULTIMATE_SIGN_IN_MENU

4. I have cleared the cache from the browser and Joomla. I tested it with different browsers, and it is the same in all of them.

5. Is there anything in the search module that I can configure?

This is the part of the English language file:

Code: Select all

COM_FINDER="Smart Search"
COM_FINDER_ADVANCED_SEARCH_TOGGLE="Advanced Search"
COM_FINDER_ADVANCED_TIPS_AND="<p>Entering <strong>this and that</strong> into the search form will return results containing both &quot;this&quot; and &quot;that&quot;.</p>"
COM_FINDER_ADVANCED_TIPS_INTRO="<p>Here are a few examples of how you can use the search feature:</p>"
COM_FINDER_ADVANCED_TIPS_NOT="<p>Eingabe Entering <strong>this not that</strong> into the search form will return results containing &quot;this&quot; and not &quot;that&quot;.</p>"
COM_FINDER_ADVANCED_TIPS_OR="<p>Entering <strong>this or that</strong> into the search form will return results containing either &quot;this&quot; or &quot;that&quot;.</p>"
COM_FINDER_ADVANCED_TIPS_OUTRO="<p>Search results can also be filtered using a variety of criteria. Select one or more filters below to get started.</p>"
COM_FINDER_ADVANCED_TIPS_PHRASE="<p>Entering <strong>&quot;this and that&quot;</strong> (with quotes) into the search form will return results containing the exact phrase &quot;this and that&quot;.</p>"
This is the part of the German language file:

Code: Select all

COM_FINDER="Suchindex"
COM_FINDER_ADVANCED_SEARCH_TOGGLE="Erweiterte Suche"
COM_FINDER_ADVANCED_TIPS_AND="<p>Die Eingabe von <span class='term'>„dies und das“</span> in das Suchfeld zeigt alle Ergebnisse, die beide Wörter, „dies“ und „das“ enthalten.</p>"
COM_FINDER_ADVANCED_TIPS_INTRO="<p>Einige Beispiele zur Benutzung der Suche mit logischen Operatoren:</p>"
COM_FINDER_ADVANCED_TIPS_NOT="<p>Die Eingabe von <span class='term'>„dies nicht das“</span> zeigt alle Ergebnisse, die „dies“, aber nicht „das“ enthalten.</p>"
COM_FINDER_ADVANCED_TIPS_OR="<p>Die Eingabe von <span class='term'>„dies oder das“</span> zeigt alle Ergebnisse, die entweder „dies“ oder „das“ enthalten.</p>"
COM_FINDER_ADVANCED_TIPS_OUTRO="<p>Suchergebnisse können auch nach verschiedenen Kriterien gefiltert werden. Um zu beginnen, einen oder oder mehrere Filter auswählen.</p>"
COM_FINDER_ADVANCED_TIPS_PHRASE="<p>Die Eingabe von <span class='term'>„dies und das“</span> (mit Anführungszeichen) zeigt alle Ergebnisse, die genau die Wortfolge „dies und das“ enthalten.</p>"

For COM_FINDER, this language file is loaded:

Code: Select all

com_finder    + /language/de-DE/com_finder.ini

These are the language files that are being loaded:

Code: Select all

Extension	File

joomla
	+ /language/de-DE/joomla.ini

lib_joomla
	+ /language/de-DE/lib_joomla.ini

plg_system_jcepro
	- /administrator/language/de-DE/plg_system_jcepro.ini
- /administrator/language/de-DE/de-DE.plg_system_jcepro.ini
- /plugins/system/jcepro/language/de-DE/plg_system_jcepro.ini
- /plugins/system/jcepro/language/de-DE/de-DE.plg_system_jcepro.ini

plg_system_visformsdatadelete
	+ /administrator/language/de-DE/plg_system_visformsdatadelete.ini

plg_system_helixultimate
	/plg_system_helixultimate.ini
- /administrator/language/de-DE/de-DE.plg_system_helixultimate.ini
- /plugins/system/helixultimate/language/de-DE/plg_system_helixultimate.ini
- /plugins/system/helixultimate/language/de-DE/de-DE.plg_system_helixultimate.ini

plg_system_ic_autologin
	- /administrator/language/de-DE/plg_system_ic_autologin.ini
- /administrator/language/de-DE/de-DE.plg_system_ic_autologin.ini
- /plugins/system/ic_autologin/language/de-DE/plg_system_ic_autologin.ini
- /plugins/system/ic_autologin/language/de-DE/de-DE.plg_system_ic_autologin.ini

plg_system_ic_library
	- /administrator/language/de-DE/plg_system_ic_library.ini
+ /administrator/language/de-DE/de-DE.plg_system_ic_library.ini

plg_icagenda_pro
	- /administrator/language/de-DE/plg_icagenda_pro.ini
- /administrator/language/de-DE/de-DE.plg_icagenda_pro.ini
- /plugins/icagenda/pro/language/de-DE/plg_icagenda_pro.ini
- /plugins/icagenda/pro/language/de-DE/de-DE.plg_icagenda_pro.ini

plg_icagenda_tickets
	- /administrator/language/de-DE/plg_icagenda_tickets.ini
+ /administrator/language/de-DE/de-DE.plg_icagenda_tickets.ini

plg_icagenda_payment_paypal
	- /administrator/language/de-DE/plg_icagenda_payment_paypal.ini
+ /administrator/language/de-DE/de-DE.plg_icagenda_payment_paypal.ini

plg_actionlog_icagenda
	- /administrator/language/de-DE/plg_actionlog_icagenda.ini
+ /administrator/language/de-DE/de-DE.plg_actionlog_icagenda.ini

plg_actionlog_visforms
	+ /administrator/language/de-DE/plg_actionlog_visforms.ini

plg_actionlog_joomla
	+ /administrator/language/de-DE/plg_actionlog_joomla.ini

lib_ic_library
	- /language/en-GB/lib_ic_library.ini
+ /language/en-GB/en-GB.lib_ic_library.ini
- /language/de-DE/lib_ic_library.ini
+ /language/de-DE/de-DE.lib_ic_library.ini

plg_system_icagenda	
- /administrator/language/de-DE/plg_system_icagenda.ini
+ /administrator/language/de-DE/de-DE.plg_system_icagenda.ini

tpl_shaper_helixultimate	
- /language/de-DE/tpl_shaper_helixultimate.ini
- /language/de-DE/de-DE.tpl_shaper_helixultimate.ini
- /templates/shaper_helixultimate/language/de-DE/tpl_shaper_helixultimate.ini
- /templates/shaper_helixultimate/language/de-DE/de-DE.tpl_shaper_helixultimate.ini

com_finder	
+ /language/de-DE/com_finder.ini

plg_content_finder	
+ /administrator/language/de-DE/plg_content_finder.ini

plg_finder_categories	
+ /administrator/language/de-DE/plg_finder_categories.ini

plg_finder_contacts	
+ /administrator/language/de-DE/plg_finder_contacts.ini

plg_finder_content	
+ /administrator/language/de-DE/plg_finder_content.ini

plg_finder_newsfeeds	
+ /administrator/language/de-DE/plg_finder_newsfeeds.ini

plg_finder_tags	
+ /administrator/language/de-DE/plg_finder_tags.ini

PLG_FINDER_ICAGENDA	
- /administrator/language/de-DE/PLG_FINDER_ICAGENDA.ini
- /administrator/language/de-DE/de-DE.PLG_FINDER_ICAGENDA.ini
- /plugins/finder/icagenda/language/de-DE/PLG_FINDER_ICAGENDA.ini
- /plugins/finder/icagenda/language/de-DE/de-DE.PLG_FINDER_ICAGENDA.ini

plg_finder_visforms	
+ /administrator/language/de-DE/plg_finder_visforms.ini

plg_finder_icagenda	
- /administrator/language/de-DE/plg_finder_icagenda.ini
+ /administrator/language/de-DE/de-DE.plg_finder_icagenda.ini

tpl_	
- /templates//language/de-DE/tpl_.ini
- /templates//language/de-DE/de-DE.tpl_.ini

plg_system_jcemediabox	
- /administrator/language/de-DE/plg_system_jcemediabox.ini
+ /administrator/language/de-DE/de-DE.plg_system_jcemediabox.ini

mod_finder	
+ /language/de-DE/mod_finder.ini

mod_menu	
+ /language/de-DE/mod_menu.ini

mod_custom	
+ /language/de-DE/mod_custom.ini

mod_jsvisit_counter	
- /language/de-DE/mod_jsvisit_counter.ini
+ /language/de-DE/de-DE.mod_jsvisit_counter.ini

mod_banners	
+ /language/de-DE/mod_banners.ini

mod_ic_event_list	
- /language/de-DE/mod_ic_event_list.ini
+ /language/de-DE/de-DE.mod_ic_event_list.ini
- /language/en-GB/mod_ic_event_list.ini
+ /language/en-GB/en-GB.mod_ic_event_list.ini

plg_content_vfdataview	
+ /administrator/language/de-DE/plg_content_vfdataview.ini

com_visforms	
+ /language/de-DE/com_visforms.ini

plg_content_vfformview	
+ /administrator/language/de-DE/plg_content_vfformview.ini

plg_content_confirmconsent	
+ /administrator/language/de-DE/plg_content_confirmconsent.ini

plg_content_jw_allvideos	
- /administrator/language/de-DE/plg_content_jw_allvideos.ini
- /administrator/language/de-DE/de-DE.plg_content_jw_allvideos.ini
- /plugins/content/jw_allvideos/language/de-DE/plg_content_jw_allvideos.ini
- /plugins/content/jw_allvideos/language/de-DE/de-DE.plg_content_jw_allvideos.ini

mod_articles_latest	
+ /language/de-DE/mod_articles_latest.ini

plg_system_debug	
+ /administrator/language/de-DE/plg_system_debug.ini
I'm going crazy here, this is unbelievable. I hope you still have an idea.

You're welcome in advance!

rloeffler
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Apr 10, 2024 11:07 am

Re: Problem with language file in advanced search module

Post by rloeffler » Thu Feb 13, 2025 3:42 pm


User avatar
ceford
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3097
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Problem with language file in advanced search module

Post by ceford » Thu Feb 13, 2025 4:22 pm

Here is the code where the tips block is rendered:

Code: Select all

            <legend class="com-finder__search-advanced visually-hidden">
                <?php echo Text::_('COM_FINDER_SEARCH_ADVANCED_LEGEND'); ?>
            </legend>
            <?php if ($this->params->get('show_advanced_tips', 1)) : ?>
                <div class="com-finder__tips card card-outline-secondary mb-3">
                    <div class="card-body">
                        <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_INTRO'); ?>
                        <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_AND'); ?>
                        <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_NOT'); ?>
                        <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_OR'); ?>
                        <?php if ($this->params->get('tuplecount', 1) > 1) : ?>
                            <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_PHRASE'); ?>
                        <?php endif; ?>
                        <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_OUTRO'); ?>
                    </div>
                </div>
            <?php endif; ?>
You will see that COM_FINDER_ADVANCED_TIPS_INTRO comes first. But in your site it is second. The only explanation I have is that there is an override that has changed the rendering.

The order in the ini files does not matter. Except that any second entry of the same key will override the first entry.

There are occasional issues with non English characters but they usually affect the whole ini file or all of the file after a problem occurs.

rloeffler
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Apr 10, 2024 11:07 am

Re: Problem with language file in advanced search module

Post by rloeffler » Thu Feb 13, 2025 4:53 pm

As I wrote, there is only one override entry and it is not for COM_Finder but for the Helix Ultimate template.

I have compared and reviewed everything. I am quite experienced with Joomla, but I have never encountered this problem before.

What is strange is that in the advanced search, only the top field outputs the English language, all the following fields show the German language. And I do not understand that.
Aufnahme2.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
ceford
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3097
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Problem with language file in advanced search module

Post by ceford » Thu Feb 13, 2025 5:56 pm

I used the browser Developer Tools to look at the code of your advanced search form. It is a little different from mine. It is the first line that is significant in each of these snippets.

Your code (tidied to make it more readable):

Code: Select all

<div class="card card-outline-secondary mb-3">
	<div class="card-body">
		<p>Entering <strong>this and that</strong> into the search form will return results containing both "this" and "that".</p> 
		<p>Here are a few examples of how you can use the search feature:</p> 
		<p>Entering <strong>this not that</strong> into the search form will return results containing "this" and not "that".</p> 
		<p>Entering <strong>this or that</strong> into the search form will return results containing either "this" or "that".</p> 
		<p>Search results can also be filtered using a variety of criteria. Select one or more filters below to get started.</p>
		<p>Entering <strong>"this and that"</strong> (with quotes) into the search form will return results containing the exact phrase "this and that".</p>						
	</div>
</div>
My code:

Code: Select all

<div class="com-finder__tips card card-outline-secondary mb-3">
	<div class="card-body">
		<p>Here are a few examples of how you can use the search feature:</p>
		<p>Entering <strong>this and that</strong> into the search form will return results containing both "this" and "that".</p>                        
		<p>Entering <strong>this not that</strong> into the search form will return results containing "this" and not "that".</p>
		<p>Entering <strong>this or that</strong> into the search form will return results containing either "this" or "that".</p>
		<p>Search results can also be filtered using a variety of criteria. Select one or more filters below to get started.</p>
	</div>
</div>
I also noticed a difference in the spacing versus tabs used for white space in the two layouts.

I suggest you open components/com_finder/tmpl/search/default_form.php with a text editor and have a look at lines 67 and 68.

Code: Select all

                        <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_INTRO'); ?>
                        <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_AND'); ?>
My code is from Version 5.2.3

You may need to search all of the php files in your code for those two ini keys. And perhaps the ini files too if they have been added accidentally elsewhere.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31678
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Problem with language file in advanced search module

Post by Per Yngve Berg » Thu Feb 13, 2025 6:02 pm

Enable Language Debug

Is the String shown as **String**?

If you see ??String?? It's not present in Language File.

If you only see String, it's hard coded and not translated.

rloeffler
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Apr 10, 2024 11:07 am

Re: Problem with language file in advanced search module

Post by rloeffler » Fri Feb 14, 2025 7:35 am

Per Yngve Berg wrote: Thu Feb 13, 2025 6:02 pm Enable Language Debug

Is the String shown as **String**?

If you see ??String?? It's not present in Language File.

If you only see String, it's hard coded and not translated.
That was the crucial hint; the ??COM_FINDER_ADVANCED_TIPS?? is not present in the language file.

I have now created this string and added the texts.

If this string is missing, then that is a problem in the code, right?

Thank you

"Can someone send me the correct Finder files?

rloeffler
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Apr 10, 2024 11:07 am

Re: Problem with language file in advanced search module

Post by rloeffler » Fri Feb 14, 2025 7:51 am

Thanks to all who helped here


I have now created an override for the string and removed it again from the language file. It now works flawlessly.

Many thanks to everyone for their support and tips.

Advertisement

Post Reply

Return to “Language - Joomla! 5.x”