Forum Discussion
Multiple language support for Android F5 Access 3.0.8
As noted in K02242270, F5 Access 3.0.8 for Android does not provide the "Accept-Language" header in the initial request to the Big-IP. In order to provide support for multiple languages it is necessary to inspect the traffic that arrives a bit later on in the handshake process. The following irule allows the default language to be overridden with (in this case) French.
when CLIENT_ACCEPTED {
#
# Required so that "when HTTP_REQUEST" can be used to patch the language issue with F5 Access for Android.
#
ACCESS::restrict_irule_events disable
}
when HTTP_REQUEST {
#
# Access policy default language is English. Look for French OS.
#
if { [HTTP::path] equals "/my.policy" && [HTTP::method] equals "POST" && !([HTTP::cookie exists "LastMRH_Session"]) && [string match "fr*" [HTTP::header "Accept-Language"]]} {
ACCESS::session data set session.ui.lang "fr"
}
}
Note that the Accept-Language header is correctly supplied by the F5 VPN clients for Windows, Mac and iOS. The iRule is required for Android only. If using this in a mixed environment then you would likely want to add a check for [HTTP::header User-Agent] contains "Android" to the if statement.
Hello David, thanks for the contribution, I would suggest moving this thread to Technical Articles.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com