Support Forum
Looking in the options database table, WPLANG is set to fr_FR. That was one of the first things I checked.
French version of WordPress actually is packaged with the translation files as fr_FR and not fr. I just re-downloaded the latest version of WordPress core from the link I provided to confirm this. I invite you take a look and you'll see that "fr" is not used.
At this point then, I'll look in the simplepress code and make the adjustment. Hopefully though this can be resolved in the next version released.
Thanks,
Tonya
Bringing ideas to life is my art
Web Developer · Software & Electrical Engineer · WordPress · Genesis
Find me: tonyadoescode.com | LUNARWP | Twitter
I am not sure what you are getting at here.
i know that WordPress uses 'fr_FR' for French as I said above. It is incorrect but I know they use it.
As to changing something in the SP code then there is nothing to change and I do not have a clue what it is you are proposing to change. Things work just fine for most people.
The only question mark I have here is why it is determining that you are running in English. Have you checked if there s a WP_LANG constant in the wp-config.php file set to English? WordPress made the transition from the constant to the database option record in V4.0. Depending on your SP version it might be looking there. Any checks with that constant were removed in SP version 5.5.3.
YELLOW
SWORDFISH
|
Hello,
Let me walk through what I found and did:
- Yes, WPLANG in the _options db is set to 'fr_FR'.
- And I had the define in the config.php just in case the code was still using it
Debug effort:
1) After a global search for the message 'Your site language setting is English/US and therefore no translation files are required for Simple:Press', I found it in the file simple-press/admin/forms/panel-integration/spa-integration-language-form.php. After var_dump on $locale and $siteLang, the initial states are 'fr_FR', but then after the substr on $siteLang it is false. Therefore, I forced $siteLang to 'fr' when $locale is 'fr_FR', see the code change (Gist).
This change got rid of the message and allowed me to then load up each of the translation files through the admin panel.
2) Quick check on the frontend and it still was not loading the French translations.
3) Next I searched for where $locale and/or get_locale() where being used.
See file simple-press/sp-startup/site/sp-site-support-functions.php line 184 in function sp_localisation(). A quick var_dump on $locale shows it is set to 'fr_FR'. As all the translation files are set to -fr.mo and not -fr_FR.mo, I added the conditional to set $locale = 'fr'. See the changes here in this gist. I made similar changes in sp_plugin_localisation() and sp_theme_localisation().
Now French loads.
I hope this debug effort and code examples help.
Cheers,
Tonya
Bringing ideas to life is my art
Web Developer · Software & Electrical Engineer · WordPress · Genesis
Find me: tonyadoescode.com | LUNARWP | Twitter
Simple:Press version 5.5.1
WordPress version 4.1
Bringing ideas to life is my art
Web Developer · Software & Electrical Engineer · WordPress · Genesis
Find me: tonyadoescode.com | LUNARWP | Twitter
That might have something to do with it.
Simple:Press 5.5.3 is needed to work properly with WordPress 4.1. When 5.5.1 was released W was still using the wp-config.php setting exclusively and things are a lot different.
I would expect there to be quite a few other small issues as well.
YELLOW
SWORDFISH
|
Upgrading to 5.5.3 from 5.5.1 resolved the translation issue. Thank you.
Bringing ideas to life is my art
Web Developer · Software & Electrical Engineer · WordPress · Genesis
Find me: tonyadoescode.com | LUNARWP | Twitter
good to hear... thanks for the update..
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)