Coder Social home page Coder Social logo

language_selector's Introduction

Language selector

Build Status Scrutinizer Code Quality Latest Stable Version License

Provides a language_selector view to use in your themes. If you are using a default theme, there is an admin option to extend the header with the language selector. Check the admin settings of the plugin for things to configure.

Features

  • language_selector/default view to use in themes
  • handles translation preferences for logged in (user preferences) AND non logged in users (cookies)
  • incorporated autodetection of browser language (only for non logged in users)
  • language selector display country codes or flags

Notes

  • To add a language selector in a custom position, use elgg_view('language_selector/default')
  • To display a language selector with a dropdown, use elgg_view('language_selector/dropdown')
  • To add a custom language icon or replace an existing one, add an image file (svg, jpg, png, gif) in your plugin under /views/default/language_selector/flags/$language_code.$ext.

language_selector's People

Contributors

facyla avatar hypejunction avatar isoguci1 avatar jdalsem avatar jeabakker avatar juho-jaakkola avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

language_selector's Issues

Caching problem cause language error at first load

I'm trying to solve a bug with the elgg_set_plugin_setting for "allowed_languages", it suffers of caching problems, continuously deleting and rewriting the plugin setting on the DB, causing also a first load language selection error when the browser language it's different from default one.
I'm debugging with DB table "private_settings" opened to get the point but I'm not able to solve it, it seems that
elgg_register_plugin_hook_handler("all", "plugin", "language_selector_invalidate_setting");
and
elgg_register_event_handler("all", "plugin", "language_selector_invalidate_setting");

are involved in the caching problem, since when commenting this lines the problem disappear.
The language_selector_invalidate_setting is invoked correctly only one time during the hook trigger 'setting','plugin' just before the setPrivateSetting, but the data on the private_settings DB table disappears during the page cycle execution (I guess inside the elgg_trigger_event('init', 'system').
I'm running elgg 1.8.18.
Thank you for help.

Translations of objects

Hi!
I need a solution that allows to have translated version of certain contents (objects). For example: allow a user to create a blog entry (or group page, etc.) in English and Spanish (and maybe others), so the blog entry is accessible in those languages.

I understand the this plugin doesn't include this feature. Am I right?

If not, would it be possible to add it? Would you be interested in doing it? Maybe it require a sponsorship?

Hope I am clear. Thx!

About the inerface

HI,

i would like to know how to use this file and how can't I see the interface?

Thank.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.