en-CA not being used in template Topic is solved

General questions regarding the use of languages in Joomla! 4.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.
Locked
User avatar
GPixels
Joomla! Guru
Joomla! Guru
Posts: 796
Joined: Thu Aug 17, 2006 8:24 pm
Location: Canada

en-CA not being used in template

Post by GPixels » Thu Apr 27, 2023 10:04 pm

Did I miss something?

I am making a template from a duplicated Cassiopea template where I simply renamed and replaced the name with my own. I then used Discover to install it and made it the default live template.

The site is set to en-CA, but the "template" is not using en-CA. Instead, it keeps using the en-GB where I have a copy of the new template's ini and sys.ini located as well. Despite having the added language files for the template in the /language/en-CA/ directory.

Note: The website does show the language in the HTML tag as "en-ca"

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

Re: en-CA not being used in template

Post by Per Yngve Berg » Fri Apr 28, 2023 1:41 pm

Enable Debug and Language Debug in Global Configuration. Then inspect what Language Files are loaded.

User avatar
GPixels
Joomla! Guru
Joomla! Guru
Posts: 796
Joined: Thu Aug 17, 2006 8:24 pm
Location: Canada

Re: en-CA not being used in template

Post by GPixels » Fri Apr 28, 2023 8:19 pm

Thank you for the follow-up.

I enabled the Debugging....the front end seems to be OK as the HTML tag has en-ca in it.
However, it's the admin side that appears to be the issue. It's still loading en-GB. I have the Joomla language en-CA selected and active, though.
You do not have the required permissions to view the files attached to this post.

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

Re: en-CA not being used in template

Post by imanickam » Sat Apr 29, 2023 5:28 am

There are more language files information missing. Please post the screenshot after scrolling down the pane further, beyond tpl_atum.

Also, check the language files names of the template and their location.
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
GPixels
Joomla! Guru
Joomla! Guru
Posts: 796
Joined: Thu Aug 17, 2006 8:24 pm
Location: Canada

Re: en-CA not being used in template

Post by GPixels » Mon May 01, 2023 5:10 pm

TemplateDetails xml has:

Code: Select all

	<languages folder="language">
		<language tag="en-CA">en-CA/tpl_aj.ini</language>
		<language tag="en-CA">en-CA/tpl_aj.sys.ini</language>
	</languages>
To recap, though from before:
  • I duplicated Cassipeia
  • Used Discover to find the duplicated and renamed template AJ
  • I changed the template's en-GB to en-CA
  • I installed the en-CA language in Joomla Languages
  • Under Manage Languages, I made en-CA default
  • Under Languages-Content, English (Canada) is published
The front-end is loading the template's en-CA and has since the beginning. However, the admin area is the issue; it still shows the HTML tag with en-GB in it.

I'm trying to think if I missed anything, but the issue seems to be that Joomla is not changing to the language that is active.

I attached a new screenshot showing the full list.
You do not have the required permissions to view the files attached to this post.

User avatar
GPixels
Joomla! Guru
Joomla! Guru
Posts: 796
Joined: Thu Aug 17, 2006 8:24 pm
Location: Canada

Re: en-CA not being used in template

Post by GPixels » Mon May 01, 2023 5:23 pm

Quick update to my last reply...if I go to the active template Site "Style" window, and view the Details tab, I see this:

This template is custom for the AJ template and website - 2023 aaaa.

I added the tpl_aj.ini (and the sys ini one) to the /languages/en-GB folder. I added the "aaaa" to that file and did a "bbbb" to the one in the /languages/en-CA folder to see which one is being used. The aaaa is displayed (from the en-GB folder.

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

Re: en-CA not being used in template

Post by imanickam » Mon May 01, 2023 5:57 pm

Please attach the screenshot after page "Templates: Edit Style". For this open the template style of your template for Edit.

Only in this screen, you would notice the language files loaded for that page (ie language files of site template style).
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
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31084
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: en-CA not being used in template

Post by Per Yngve Berg » Mon May 01, 2023 6:02 pm

Have you chosen the correct Language when logging in to the Administrator?

Default Language is also set separately for Site and Administrator in the User profile.

User avatar
GPixels
Joomla! Guru
Joomla! Guru
Posts: 796
Joined: Thu Aug 17, 2006 8:24 pm
Location: Canada

Re: en-CA not being used in template

Post by GPixels » Mon May 01, 2023 7:13 pm

Bingo!

I am so used to just doing the username+password, not even noticing the language choice on the login.

Thanks!

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

Re: en-CA not being used in template

Post by imanickam » Tue May 02, 2023 6:35 am

Glad that the problem has been resolved. In case, if you always use en-CA as the language in the back-end, you could make the Default Admin Language to be en-CA. With this setup, there is no need to choose the language en-CA while logging into the back-end.
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
GPixels
Joomla! Guru
Joomla! Guru
Posts: 796
Joined: Thu Aug 17, 2006 8:24 pm
Location: Canada

Re: en-CA not being used in template

Post by GPixels » Tue May 02, 2023 3:14 pm

Good recommendation to take note of. Thank you.


Locked

Return to “Language - Joomla! 4.x”