Tagged: x
-
AuthorPosts
-
August 11, 2016 at 5:58 am #1127027
IndiespectParticipantHi
I realised today that my language file isn’t active anymore. I created one for German (de_DE) which worked perfectly fine. Do you know of any changes that I have to update to get my translations back.
When I look up the language with the Google Chrome Developper Tool it’s marked as de-DE instead of de_DE.
May this be the mistake? And if yes where am I able to change that.Best, Christian
URL: http://www.indiespect.ch
Wordpress version: 4.5.3August 11, 2016 at 8:53 am #1127201
LelyModeratorHi Christian,
Would you mind giving us information on what happened before the language file stop working? Please also provide us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
August 12, 2016 at 4:33 am #1128541
IndiespectParticipantThis reply has been marked as private.August 12, 2016 at 10:22 am #1128844
DarshanaModeratorThis reply has been marked as private.August 12, 2016 at 5:00 pm #1129255
IndiespectParticipantThis reply has been marked as private.August 13, 2016 at 1:18 am #1129669
Rue NelModeratorHello There,
Thanks for the updates! What have you checked in Dev Tools is the output of the language_attributes() function. You can check out more about it from the codex:
https://codex.wordpress.org/Function_Reference/language_attributesThe one being used in the language filename should be like this:
__x__-de_DE.po __x__-de_DE.mo __x__-en_GB.po __x__-en_GB.moAnd by the way, the given credentials is still not working for us.
For more translation details, please check out our knowledge base:
https://community.theme.co/kb/translation/Hope this helps.
August 15, 2016 at 6:12 am #1131717
IndiespectParticipantHello!
Thank you for the information from the knowledge base.
The instruction how to install the translation file in the child theme has worked perfectly fine for me.Best, Christian
August 15, 2016 at 6:33 am #1131739
IndiespectParticipantSorry, but I just realised that it didn’t change everything. Or that some texts I can’t translate with this language file in poedit. Where am I able to change the text when I want to use the search function?
Right now it says: “Type and press ‘enter’ to search” and after that it says “search results”. I can’t remember that it was like this before.
Thanks for your help.
August 15, 2016 at 7:02 pm #1132653
RadModeratorHi there,
Not sure what you mean by that, would you mind providing a video recording? And which string? It could be static.
Thanks!
August 16, 2016 at 3:10 am #1133157
IndiespectParticipantHi there,
I tried to film the screen and upload it. I hope this works: http://sendvid.com/7a9l23uo
Do you see what I mean? For parts of my website it uses my translation and for others it doesn’t.
Also for the comment function at the end of every post.Best, Christian
August 16, 2016 at 7:26 am #1133423
LelyModeratorHello Christian,
Thank you for the video.
To translate those text, please add the following code on your child theme’s functions.php file:add_filter('gettext', 'translate_text' ); function translate_text($translated) { $translated = str_ireplace('Type and Press “enter” to Search', "Type and Press “enter” to Search Translation", $translated); $translated = str_ireplace('Search Results', "Search Results Translation", $translated); return $translated; }Update Type and Press “enter” to Search Translation and Search Results Translation to proper translation.
Hope this helps.
August 16, 2016 at 8:10 am #1133484
IndiespectParticipantThank you, that worked. But do I have to add a translation for every single text to that function?
If somebody looks for a keyword that doesn’t exist, the message is also in English:—
NOTHING TO SHOW RIGHT NOW
It appears whatever you were looking for is no longer here or perhaps wasn’t here to begin with. You might want to try starting over from the homepage to see if you can find what you’re after from there.—
And also the comment section after every post is in English. Isn’t there a way to translate those text in PoEdit or somewhere similar?
Best, Christian
August 16, 2016 at 6:13 pm #1134294
RadModeratorHi there,
They should be translatable within PoEdit, you may add strings if not available and translate them. Example, that section is available here wp-content\themes\x\framework\views\global\_content-none.php
<article id="post-0" class="post-0 post type-post status-publish hentry"> <div class="entry-wrap"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing to Show Right Now', '__x__' ); ?></h1> </header> <div class="entry-content"> <p><?php _e( "It appears whatever you were looking for is no longer here or perhaps wasn't here to begin with. You might want to try starting over from the homepage to see if you can find what you're after from there.", '__x__' ); ?></p> </div> </div> </article> <!-- end #post-0 -->The string is outputted by _e() https://codex.wordpress.org/Function_Reference/_e which makes it translatable.
Yes, those strings in the comment section are translatable too. If you can’t find those string then please add them then translate it.
Thanks!
August 17, 2016 at 4:55 am #1134941
IndiespectParticipantOkay, it worked to add new strings to PoEdit and translate them. But not for the strings in the comment section.
But it’s really strange since all those texts used to be in German a few weeks ago. Was there an update or something that changed the handling of the language?I have to look through the whole website to find English text phrases. And most of it isn’t in the language file itself…
There is no way to insert standard German translations for all those sentences?August 17, 2016 at 5:15 pm #1135872
RadModeratorHi there,
It shouldn’t change, the comment section is part of WordPress and we only did some styling to make it blend with the theme. This might help https://wpml.org/forums/topic/translate-placeholder-comments-text/ and can be customized here \wp-content\themes\x\framework\views\integrity\wp-comments.php
One language should represent one language only, you can’t mix English and German base string.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1127027 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
