It would be great if we could limit the langauges shown to a user based on the customer that they login underneath for a given domain.
If a user logs into our site and their credentials allow them to use the translation service it would be nice to limit the number of langauges available because not all of our clients need to see all the langauges that we have setup for our site, just the ones they are interested in.
Example:
Let’s say we have Spanish, French, and German setup for our domain, but we have client using our site that doesn’t want to see a French or German option but only wants to see a Spanish version. Currently, they see all three options because that is what is setup for the domain. If we could just add something to the Javascript to eliminate those options for this person, but have them still available for everyone that would be great!
I don’t think you have that option now, but if you do, we would love to know how to limit the visible selections.
Hey, thanks for your feedback. What would be a use case for this ? Why would you need to limit the languages shown ? And how would you determine the languages that are shown ? Would it be based on IP address ?
We have developed a platform for our clients that changes based on the user that is logged. The domain remains the same, but the content changes, the colors, images change… basically the entire site changes. Some of our clients do not want the change language option and we control which clients see the weglot javascript on their instance of the our site. We have requests from our clients to know show certain languages because they have no used for certain languages. It would be great if we could add something to javascript that would eliminate some of the langauges that we have available for the domain. It is not based on IP address but rather an account number in our system. We can add switches to the accounts and dynamically build the javacript based on which switches are turned on. Example… let’s say for our domain we have Spanish and French. And we have 2 accounts in our system that want the langauge translation service to appear, but neither account wants both language options. One wants only French and the other only wants Spanish.
Ok I see. So a workaround for this would be to use CSS to hide the langues you don’t want based on the account number. When you build the Javascript, you can also build a <style> tag that you will personalized. For example it would be for a user:
.country-selector .es { display:none; }
This should be able to produce the desired effect.
Best