WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
Different theme for every language (5 posts)

  1. vegatron
    Member
    Posted 9 months ago #

    can I select a different theme for every language, meaning that the wordpress theme changes based on the selected language

    that is because I'm finding it hard to create one theme for English - Left to right - and Arabic - Right to Left-, which can be easily solved by using two themes.

    the other solution is for me to use two seperate wordpress installations, but I don't want that, because that would be unpractical for: user accounts, plugins, general settings, content sync, widgets ...

    ---
    so even if polylang doesn't support this feature , would it be possible to do it by code?

    thanks.

    http://wordpress.org/plugins/polylang/

  2. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    That's perhaps possible but you probably don't need it. In your theme directory, you can have a css stylesheet per language en_US.css and ar.css which will be automatically loaded by WordPress. (You have to keep the main style.css).

    This codex entry may help you too

    If you need specific php code, you can use get_locale() which will return 'en_US' or 'ar' depending on the current language.

  3. vegatron
    Member
    Posted 9 months ago #

    Thanks Chouby,

    Apparently this is how I'm going to do it.
    but lets say I wanted to have one theme per language, is it possible to implement, could you show me how to do it ?

    because having separate themes will give me more freedom, I'll be able to change the php files - to change the html - ...

  4. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    I have no clue on how to do it. I believ some plugins can switch themes depending on the displayed page but I don't know if one of them is compatible with multilingual plugins.

  5. Marcel Andrew
    Member
    Posted 9 months ago #

    The best way to have a theme per language is to use a multisite (WP network) install and a multilingual plugin adapted to this multisite install... remember that a multisite install need good knowledge with WP... see this page :

    http://codex.wordpress.org/Multilingual_WordPress - ยง5 at start

    M.

Reply

You must log in to post.

About this Plugin

About this Topic