Displaying the language on the Epsilon header

T1ZE

New member
XNullUser
Joined
Jan 13, 2025
Messages
13
Reaction score
7
Points
3
Location
Kazahstan
NullCash
70
Hello forum members! Please tell me how to set language switching on the Epsilon template on the header of the website in the web version? Where and what needs to be added to be displayed
Post automatically merged:

I did this using the Epsilon template, and others can also be implemented. Slightly changing the code

I've solved the problem. If you suddenly want to do the same thing, I'll leave instructions here.
We go here first and add the code oc-content\themes\epsilon\header.php. By placing it right under this code

<div class="divider">&nbsp;</div>
<div class="navbar"> <div class="dropdown"> <button class="dropbtn"><?php _e('language');?> <i class="fa fa-caret-down"></i> </button> <div class="dropdown-content"> <?php if ( osc_count_web_enabled_locales() > 1) { ?> <div class="language" > <?php osc_goto_first_locale(); ?> <?php while ( osc_has_web_enabled_locales() ) { ?> <a class="lnk lang <?php if (osc_locale_code() == $current_locale['pk_c_code']) { ?>active<?php } ?>" href="<?php echo osc_change_language_url(osc_locale_code()); ?>"><img src="<?php echo osc_current_web_theme_url();?>images/country_flags/<?php echo strtolower(substr(osc_locale_code(), 3)); ?>.png" alt="<?php _e('Country flag', 'beta');?>" />&nbsp;<span><?php echo osc_locale_name(); ?></span></a> <?php } ?> </div> <?php } ?> </div> </div> </div>

Next, you will need to add the code in this file oc-content\themes\epsilon\css\stayle.css Adding the code at the very end. And at the very end there is this code right below it.

[ISPOILER]/* RESET */ fieldset{border:none;display:inline-block;padding.................[/ISPOILER]

[ISPOILER]/* Language */ <style> body { font-family: Verdana,Arial,sans-serif; } .navbar { overflow: hidden; background-color: #60606000; } .navbar a { float: left; font-size: 16px; font-weight: bold; color: #60606096; text-align: center; padding: 14px 16px; text-decoration: none; } .dropdown { float: left; overflow: hidden; } .dropdown .dropbtn { font-size: 15px; font-weight: bold; border: none; outline: none; color: #606060bf; padding: 10px 12px; border-radius: 5px; background-color: inherit; font-family: inherit; } .navbar a:hover, .dropdown:hover .dropbtn { background-color: #e6641e36; } .dropdown-content { display: none; position: absolute; background-color: #f9f9f9; min-width: 120px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1; } .dropdown-content a { float: none; color: black; padding: 12px 16px; text-decoration: none; display: block; text-align: left; } .dropdown-content a:hover { background-color: #ddd; } .dropdown:hover .dropdown-content { display: block; } </style> [/ISPOILER]

I think I wrote in detail how I implemented it. If you have any questions, please contact me. Use it
However, that's how it turned out as in the photo
 

Attachments

  • capture1.png
    capture1.png
    187.8 KB · Views: 6
  • capture3.jpg
    capture3.jpg
    19 KB · Views: 1
  • capture41.png
    capture41.png
    65.9 KB · Views: 3
Last edited:
Top