Custom Fileds Component | locales not working

Oliver Mankewitz Posted in Technical Support 5 years ago

Hi,
I uploaded the CustomFileds component and mentioned that the fileds doesnt get the data from locale-file. (e.g. it shows admin:customfields instead of "Benutzerfelder" or "User fields").

Same behaviour with components
- Feedback
- FirstLogin
- Menuebuilder and
- Announcement

Whats wrong and how can I fix that?

Thanks for your help!

Oliver

Replies
German Oliver Mankewitz Replied 5 years ago

Hi, -Z-Man!
You made my day! Thank you very much for your help!
Now, all components are working!
Thumbs up!

German Michael Zülsdorff Replied 5 years ago

Just had a look into a rather old German locale file of custom fields - and that one in fact won't work because of a wrong last line.
So please try to change the last line to

ossn_register_languages('de', $en);
German Oliver Mankewitz Replied 5 years ago

I did another test:
I changed the ossn.en.php to ossn.de.php and changed "register languages" to "de". Just to be sure the former created de-file is okay or not.
So, nothing changed. It seems, that (in my case) no de-files will be used.
The strange thing: The component "Footer Links" works perfectly. In English and German.
I am lost.

German Oliver Mankewitz Replied 5 years ago

Switching to english locale, all works fine.
Switching back to de locale, will result in behaviour described in inital post.
Even with ossn.de.php in components language directory.

Link to Pic with error

Edit: Switched to english language, edited the english locale of CustomFields, saved it and it showed the changes Ive made. It seems that the de-file isnt recognized...

Indonesian Arsalan Shah Replied 5 years ago

Try to change your langauge into English in profile edit page and see if it works?

German Oliver Mankewitz Replied 5 years ago

Hi, Arsalan!

Ah! I see.
But the component "CustomFileds" does have locale-files. Both, english and german.(../CustomFileds/locale/ossn.de.php)
Checked for the ossn_register_languages parameter and changed it in the german locale file to ossn_register_languages('de', $de); (Was ossn_register_languages('en', $en); ).

Flushed the cache but no change!

Edit: Adding new locales doesnt work either. (e.g. Feedback component).

Edit: Changes to the goblue theme arent displayed (changed the background image only).
Maybe its a server configuration problem?
Server setup by https://www.howtoforge.com/tutorial/how-to-install-open-source-social-network-ossn-on-ubuntu/

UPDATE: Changes to the theme are working! Forget to flush the cache. :/
But locales of the components still arent used.

Indonesian Arsalan Shah Replied 5 years ago

That means that your website language is in German, and the components aren't translated into German, you may translate it by going into component folder, then locale , then copy ossn.en.php to ossn.de.php and start translating (remember to change code in bottom to en to de)

Detailed instructions can be found here : https://www.opensource-socialnetwork.org/wiki/view/2132/how-to-translate-ossn