Open garciademarina opened 9 years ago
Hi! I created a theme bender_child, is now not working Russian translation. Where to insert this code?
Is there a solution?
Has created your own theme, bender-my-theme Working properly
:) Sorry for bad english
So... any good solution to this?
Our solution was to replace line 52 in os-includes/osclass/core/Translation.php from: $domain = osc_theme(); to: $domain = str_replace('_child', '', osc_theme());
our child theme is named 'gum_child'. We don't like this solution because we need to manually change it after every update.
Hi @vlazic
The line 52 is different in version 3.7.3
It's like:
$domain = osc_apply_filter('theme', osc_theme());
I tried to change to:
$domain = osc_apply_filter('theme', str_replace('_child', '', osc_theme()));
but nothing happened, so I tried:
$domain = str_replace('_child', '', osc_theme());
and nothing happened too.
My child theme is azzurro_child
Can anybody help us? I think this is a bug.
IDEA:
Do you think the problem is that the translate function <?php _e("<strong>Search</strong> for it:", 'azzurro') ; ?>
don't work because it opens the translation file in the main theme? Or not?
IF I replace all the azzurro
to azzurro_child
and copy the translation folder to my child it will work??
My solution for translate osclass child theme is similar like @pocapratica, work for: Osclass 3.7.4 Theme: bender Child Theme: bender_child
Open file: os-includes/osclass/core/Translation.php
Find line: 52, there is code like: $domain = osc_apply_filter('theme', osc_theme());
ad below (or instead) this line paste code:
$domain = osc_apply_filter( 'theme', str_replace('_child', '', osc_theme()) );
Refresh site - should work. Remember about cache - sometimes hosting has cache, and you should clear this to see changes, or you have wait e.g. 5 minutes.
Remeber - you should do this solution every update osclass!
Hi, I have osclass 3.8 and @Similambda & @vlazic fix not work to me, main.css header background color neither in child theme (in parent is working). When this could be fixed? thanks!
Once a child theme is activated, parent translations are missed.
We need to load parent translations with parent domain. this way we are loading both translations, parent and child translations.
for example: ( Translation-> __construct ) $theme_file = osc_themes_path() . 'bender/languages/' . $locale . '/theme.mo'; $this->_load($theme_file, 'bender');