Support Forum

My Danish translation disapeared when I pressed Get Latest

PJ Peter Jakobsen
Peter Jakobsen
Member

Hi SP,

I pressed the button Get Latest in Integretion/language translation and my Danish language disapeared..

My solution were: 

I went to http://glotpress.simple-press.com/ to get simplepress admin and front translations as PO-files and MO-files.

I oploaded them to /wp-content/sp-resources/forum-language/simple-press BUT nothing happened. 

So how do I get the Danish back?

Thanks

Peter

14 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

These appear to be the correct files (the .mo files) in the correct place…

What about your core WP system? Is WP Admin > Settings > General language properly set to da_DK ?

PJ Peter Jakobsen
Peter Jakobsen
Member

Yes, I’m sure that I have Danish core translation. 

It happened when I pressed “get latest” translation. Could it have something to do with an SimplePRess update 5.5.11? And it is not in sync with the language file?

sp-version-1.jpgwp-adminDanish-1.jpgwp-config-1.jpg

YS Yellow Swordfish
Yellow Swordfish
Member

Can I have a link to your forum page?

There were no additional language items in 5.5.11 so it is the same file as before. Can I assume that f you open the ‘;po’ file in a text editor you DO see both original and translated text? Can you look?

YS Yellow Swordfish
Yellow Swordfish
Member

It looks like it is using the ‘sp’ (core) Danish language file correctly. For example – click on the search button at the top with no search text entered. The message I see is not in English! This text comes from the ‘sp’ language file.

What it looks like you have not got is the Simple:Press theme language file. Is that your own theme or one of ours? Do you have a language ‘mo’ file for that installed?

PJ Peter Jakobsen
Peter Jakobsen
Member

Thanks for fast respond. I’m back:-)

I have made a child-theme from reboot and named it reboot-trylleskolen. Perhaps that’s the problem.

I dont know what to do. 

I tried to make a new PO file by rename “spReboot-da_DK.po” to  ” reboot-trylleskolen-da_DK.po” and make a mo-file. Then I oploaded both into folder: /wp-content/sp-resources/forum-language/sp-themes. But it did not work. 

Please take a look at the screendump. 

What Am I doing wrong?

reboot1.jpgReboot-Test1.jpg

MP Mr Papa
Mr Papa
Member

you do not need a different translation file…  unless you changed the text domain in the strings (not likely).. 

are you sure its a child reboot theme?  If so, it loads the reboot stuff as well.. did you follow the directions here:  https://simple-press.com/documentation/codex/themes/theme-basics/creating-a-child-theme/

PJ Peter Jakobsen
Peter Jakobsen
Member

I tested theme translation with child-theme: 

1. I checked the child-theme are active

2. I downloaded the reboot theme

3. Rename the reboot theme to child-them and oploaded it. 

Nothing happend.

Can you solve this mystery?testPO1.jpgtestPO2.jpgtestPO3.jpg

YS Yellow Swordfish
Yellow Swordfish
Member

The important thing is the language ‘name’ that your SP theme is looking for.  This is contained in the template file ‘spFunctions.php’. So the first question is – do you have this file in your child theme. If not then your child theme will be reliant on the one in the parent theme.

By default, the supplied ‘name’ in the parent theme is exposed in the following function:

# load the theme textdomain for tranlations
add_action(‘init’, ‘spReboot_textdomain’);
function spReboot_textdomain() {
    sp_theme_localisation(‘spReboot’);
}

This shows that the language name is ‘spReboot’. IF you have such a function n your CHILD theme then you need the name exposed in that function instead.

This needs to be the name of the MO file that your SP theme will use and it needs to be located in the (again by default) /wp-content/sp-resources/forum-language/sp-plugins.

Going to our translation website and downloading the reboot Danish MO file gives me a file name of ‘spReboot-da_DK.mo’ which is what I would expect.

However, most importantly, the Danish entry for Reboot also informs me that it is 0% translated. So that also may be the reason you are not seeing any theme related translations on your forum.

PJ Peter Jakobsen
Peter Jakobsen
Member

Thank You very much for your awesome support:-)

Now I got it and solved it immediately. 

Enjoy your sunday!