Hello,
I have a website that has two locales, fr_FR and en_US and on every page of my website, the header contains a "Login" (en_US) or "Connexion" (fr_FR) link. The link allows users to login and turns into a link for editing the user's profile.
Question 1:
I have realized that the login form is displayed in French no matter the language of the page where the link is clicked. I would like to have the login form localized according to the language of the page where the login form link was clicked. How can I do that? Is there some information that I can use to determine the previous page? What programmatic is usually used to know the current session locale?
Question 2:
The access to some of my pages (from the blog module) is restricted to some groups. However, those pages appear in the list of articles without being filtered with respect to the user's access rights to individual articles (the lack of filtering isn't a problem for me on the website that I'm currently working on). When a user who isn't connected (or who doesn't have the access rights) clicks to view one of those pages, he is presented with the login page. I would like to make the login page "group-aware" so as to display the names of the groups that can access the "target" page.
1- Is it possible to find information about the target page (which may be related to question 1) and if yes, how?
2- Is there a way to list the groups that have access to a page? I'm asking this question because I am not familiar with the architecture of the code, specifically when it comes to the class of objects that have access restrictions attached to them (is it Page? or SiteTree? or some other class?).
Thank you.