Problem: You are developing a site and want to redirect users for missing translations to a specific URL for each language instead of the homepage. The code you tried is not working. Solution: By default, WPML redirects missing translations to the homepage only. For redirecting to custom URLs per language, you might consider third-party services such as Permalink Manager Lite or Redirection. If you require further customization, we recommend using our Contractors service, which is a paid option. You can find more information here: WPML Contractors.
Please note that this solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket for further assistance.