Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Language Issue
Avatar
tonya_lunarwp
Two Rivers, WI
Member
Free Members
sp_UserOfflineSmall Offline
Jan 23, 2015 - 4:11 pm

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

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 24, 2015 - 4:31 am

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
tonya_lunarwp
Two Rivers, WI
Member
Free Members
sp_UserOfflineSmall Offline
Jan 24, 2015 - 1:41 pm

Hello,

Let me walk through what I found and did:

  1. Yes, WPLANG in the _options db is set to 'fr_FR'.
  2. 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

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 25, 2015 - 5:23 am

Let's start at 1 please...

What 'substr' are you referring to. There is no substr() being used as far as I can see.

What version of Simple:Press is this? And what version of WordPress?

andy-signature.png
YELLOW
SWORDFISH
Avatar
tonya_lunarwp
Two Rivers, WI
Member
Free Members
sp_UserOfflineSmall Offline
Jan 25, 2015 - 12:34 pm

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

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 25, 2015 - 12:57 pm

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
tonya_lunarwp
Two Rivers, WI
Member
Free Members
sp_UserOfflineSmall Offline
Jan 25, 2015 - 4:49 pm

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

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 25, 2015 - 5:01 pm

good to hear... thanks for the update..

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625