Make component only available for specific language?

Dominik L Posted in Component Development 4 days ago

hey, I've a dumb question:

is it possible to modify the ossn_com.php, so that the component is only available for people who has "German" as their profile language?

I have a component, which is specifically only available for German users in German language.

Is there a way to modify the component to get the users language and if the language is e.g. German, the component is showing for him?

Replies
Indonesian Arsalan Shah Replied 4 days ago

If you developed the component then you may know how to show pages of that component for specific langauge users example

if($user->language == 'de') { do the action}

I am afraid there is no way you disable and enable components based on langauge, there is one way to do is to unset the initialization callback, but again this need to be done by a developer who knows what are the effects of it.