Access to the topic or activity can be restricted based upon user profile field. The language (lang) field is not available. I think this would be a great enhancement to the access restrictions, to be able to restrict access based upon the users' language setting in the user profile field (defaulting to system default language). This would enhance our ability to localize a course to a user, to only display the content that is applicable to the users' language
To accomplish this I have added 2 lines of code in 2 files.
1) /lib/conditionlib.php on line 641: 'lang' => get_user_field_name('lang'),
2) /lib/moodlelib.php on line 3730: case 'language' : return get_string('lang');
There is already an implementation of this in plugin database: https://moodle.org/plugins/view/availability_language