New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem with theme translation #2899
Comments
Are the actual LAN defines loading? In other words, is it a typo in the debug message or is it an actual error in loading the file? |
No, theme LANs are not translated if I change languages - if you mean this. |
Yep, so it's an actual bug and not a typo in the debug message. Thanks. |
Have an older install with a slightly changed langingzero theme; |
@tgtje did you try to use theme lans in plugin template? I use it in comment template and they are not changed. See e107.sk |
@Jimmi08 if understand correctly : templates used (or copied) to/IN theme ? If yes, (out of my head) (idea behind as i understand, but might be wrong is the 'override' of that file which may/does exist at 2 locations...) |
@tgtje yes, copy of core template in theme folder. And in it theme lans are used. I was sure it was working before but maybe I am mistaken it with theme shortcodes. Only way you can load them is in theme.php, not in template file itself. Thanks for help.
|
Do you add it in template file? Why is not in theme.php enough? So with more templates do you load it more times? Something like this shouldnt be in templates. I will try it. Thanks. |
Jimako is right. If this works only by loading the LAN in the template files directly this is a bug. Loading them once from theme.php should be enough. |
( A) call for lang file is made in template(e107::lan(t...); = method !! languages have to be loaded path). (B)changing the template : also the new 'LAN CALL'(code) like in any other file (since it is a new LAN which is coded in file> hence a template has to reflect that). (why use a template else???) Now when multilang, one would expect a locale folder and the lang file (eg Dutch.php etc..holding these new defines). @Moc Some Dutch will be edited afterwards : ik plaats de e107::lan(t) in het template; vervolgens gebruik ik defines met een LAN die ik in het template verwerk (normale werkwijze), vervolgens MOET ik het taalbestand ( Dutch php) bijv. plaatsen in de 'root'in de languages map van het theme. Is een LAND-folder in gebruik werkt dat helaas niet.. |
Okay, follow up you want to add a LAN (code) in template, but make the call ( display the textual content aka define) through theme.php instead of adding it (e107::lan(t) ) to template... Yep works too... you need to add (IN THEME php) (ps the explanation eg use is described (commented) in e107_class php line 3191 and up,i do believe that option 1 (e107::lan('theme'); is 1-level> main languages instead of locale folder inside). Bug ? implementation/documentation ? (advanced theme building dependencies..) |
This should be enough:
this works, thank you |
Nice 👍 |
The double slash issue is gone (debug top post); and using e107::lan('theme'); (inside theme php) working.. 👍 little sidenote: e107::themeLAN(); still does; also e107::themeLAN('','THEMENAME'); Yayy 3 options :-) |
Thank you! Preferred method is:
..inside theme.php 👍 |
Thanks to all. |
I am loading LAN theme files this way:
e107::lan('theme');
In debug I can see this:
File exists:
The text was updated successfully, but these errors were encountered: