xenocrat / chyrp-lite

An ultra-lightweight blogging engine, written in PHP.
https://chyrplite.net/
BSD 3-Clause "New" or "Revised" License
402 stars 42 forks source link

Site Showing English and French (Only Set for English) #253

Closed thatgrrl closed 4 months ago

thatgrrl commented 4 months ago

Two screenshots so you can see what I'm seeing. I don't think describing it will be clear.

I checked and I still have the English language set. But, I'm getting some of the Chyrp Lite software giving French language. Some still in English. When I changed to French language settings I had the reverse, but still a mix of English and French, just in different places. I'm sure the screenshots will help far more than my description.

Screenshot 2024-05-09 154923 Screenshot 2024-05-09 154954

xenocrat commented 4 months ago

Hello there,

Did you make any change to your settings or server configuration that caused the problem to start happening? It's possible that something on the web server is interfering with Chyrp Lite's ability to set the locale and make it stick. One way to test the theory is to modify this line of code in includes/common.php to read: define('USE_GETTEXT_SHIM', true);. This will cause Chyrp Lite to use its own built-in translation engine instead of relying on the one provided by the web server.

xenocrat commented 4 months ago

Also, I should note that it's quite normal for only parts of the page to be translated when the French translation is selected, because this language translation is currently incomplete and not providing translations for all the components of Chyrp Lite. The wiki has a list of bundled translations and notes whether or not they are complete.

thatgrrl commented 4 months ago

I tried the change to common.php and saved it. Refreshed the web browser and then cleared cache too. But none of that has worked. I looked at my site in another web browser and it still has English and French. I also made sure it is still set for English. I can't think of anything I did that would cause this. I could back up the site and then install a fresh copy of Chyrp Lite. If no one else has the same error then it must be some glitch I've somehow started.

xenocrat commented 4 months ago

I think I see the problem. Are you using a version of Chyrp Lite downloaded from the master branch? I.e. you used the code > download Zip option on the project's main page here on GitHub? I see there are files in the Topaz theme folder that shouldn't be there, which is probably the cause of your problem.

Delete this file, topaz mo and all should be well.

thatgrrl commented 4 months ago

Yes, that fixed it right up. Where should I have downloaded Chyrp from instead of that file? Thank you for figuring out the problem. :)

xenocrat commented 4 months ago

I'm glad that fixed it. :-)

If you download Chyrp Lite from the main page you'll get the latest snapshot of the master branch, which is not necessarily stable. It might include bugs or features that aren't working properly yet. If you download from the releases page, you'll get the latest named release of the code. This will be a bit older, but also a bit more reliable.