Changing Language Files
Posted: Wed Mar 19, 2025 11:40 am
The way that everyone knows
In the "good old days" of early Phoenix, if you wanted to make text changes in (eg) /includes/languages/english/account.php or any other language file you would do this in one of two ways;
1. FTP in, download the file, make your changes, upload the file
or
2. Use the admin/define_languages.php to make the changes
#1 is fine.
#2 was removed due to security concerns, so is now defunct
In both cases, it would be possible to lose your changes on an update to a newer Phoenix version, as Core might have changed the file you have already changed.
The template way
The architecture in Phoenix allows language files to be overridden in the template you are using. So, you can copy (eg) /includes/languages/english/account.php to templates/{tpl}/includes/languages/english/account.php and then make changes in that new file.
Upside of this new approach is that the new file inside your template will never get overwritten by Core.
Downside of this new approach is knowing what to do to actually copy the file from one location to another location (where that location might not yet exist);
1. FTP into /includes/languages/english/account.php
2. Download the file and make changes
3. FTP traverse from /english/ down to /languages/ down to /includes/
4. FTP traverse into /templates/ then into the /{tpl}/ you are using.
At this point depending on whether this has been done before...
If it has;
5. FTP traverse into /includes/ then into /languages/ then into /english/
6. Upload the new file.
If it has not;
5. Create /includes/ folder and traverse into it
6. Create /languages/ folder and traverse into it
7. Create /english/ folder and traverse into it
8. Upload file
Not difficult, but not straightforward for someone without much technical experience.
A potential solution
This little package adds in a new link in the admin > tools dropdown called "language explorer"
From there, this should link to a new language_explorer page.
That page should be self-explanatory. If anyone could find a minute to test it, I would be very thankful.
With this new tool, the `hard work` of creating/traversing folders using FTP is gone. FTP still needs to be used to download the file, notepad or whatever to change the file, and FTP to upload the file. So there is still some technical stuff, but it is greatly reduced.
Please let me know your thoughts/idea/comments/suggestions.
I'm all ears and would appreciate anyone taking the time.
In the "good old days" of early Phoenix, if you wanted to make text changes in (eg) /includes/languages/english/account.php or any other language file you would do this in one of two ways;
1. FTP in, download the file, make your changes, upload the file
or
2. Use the admin/define_languages.php to make the changes
#1 is fine.
#2 was removed due to security concerns, so is now defunct
In both cases, it would be possible to lose your changes on an update to a newer Phoenix version, as Core might have changed the file you have already changed.
The template way
The architecture in Phoenix allows language files to be overridden in the template you are using. So, you can copy (eg) /includes/languages/english/account.php to templates/{tpl}/includes/languages/english/account.php and then make changes in that new file.
Upside of this new approach is that the new file inside your template will never get overwritten by Core.
Downside of this new approach is knowing what to do to actually copy the file from one location to another location (where that location might not yet exist);
1. FTP into /includes/languages/english/account.php
2. Download the file and make changes
3. FTP traverse from /english/ down to /languages/ down to /includes/
4. FTP traverse into /templates/ then into the /{tpl}/ you are using.
At this point depending on whether this has been done before...
If it has;
5. FTP traverse into /includes/ then into /languages/ then into /english/
6. Upload the new file.
If it has not;
5. Create /includes/ folder and traverse into it
6. Create /languages/ folder and traverse into it
7. Create /english/ folder and traverse into it
8. Upload file
Not difficult, but not straightforward for someone without much technical experience.
A potential solution
This little package adds in a new link in the admin > tools dropdown called "language explorer"
From there, this should link to a new language_explorer page.
That page should be self-explanatory. If anyone could find a minute to test it, I would be very thankful.
With this new tool, the `hard work` of creating/traversing folders using FTP is gone. FTP still needs to be used to download the file, notepad or whatever to change the file, and FTP to upload the file. So there is still some technical stuff, but it is greatly reduced.
Please let me know your thoughts/idea/comments/suggestions.
I'm all ears and would appreciate anyone taking the time.