27
Views
7
Comments
need to add language locale in URL after domain name

Hi Team,

We need to implement language locale in the URL after the domain name in our OutSystems 11 Reactive application.

Expected URL structure:

www.mydomain.com/en-US/ModuleName/PageName

Could you please confirm:

  1. Is this structure supported in OutSystems 11 Reactive?

  2. What is the recommended approach to configure the URL Pattern for this?

  3. Should the locale be handled at the screen level or via a base layout?

  4. Are there any SEO considerations or limitations we should be aware of?

Please advise on the best practice implementation.

Thanks.




2023-12-26 10-35-28
OutSystems Neo
Staff
AI Generated

To implement a language locale in the URL for an OutSystems 11 Reactive application, follow these steps, keeping SEO considerations and best practices in mind:

1. URL Structure

You can include the language locale directly in the URL path (e.g., /en/home, /es/home) or as a query string (e.g., /home?locale=en). OutSystems Reactive apps allow you to configure custom screen URLs and use the path-based structure, which is better for SEO as it avoids unnecessary query parameters.

To configure this:

  • Open Service Studio.
  • Select the screen you want to adjust.
  • In the "Advanced" section of the screen properties, set the Custom URL property to "Yes."
  • Edit the Page Name and include {locale} as a variable in the URL Structure. For instance, /Home with a parameter locale could be transformed into /en/Home. SEO-friendly URLs for Reactive Web apps

2. Configuration

To configure localization in your Reactive app:

3. SEO Considerations

SEO best practices recommend using simple and descriptive URLs that include the language locale. Follow these principles:

  • Use hyphens to separate words in URLs (e.g., /en/product-details instead of /en/ProductDetails).
  • Avoid including special characters or long query strings in the URL.
  • Prioritize static URLs, as these rank better in search engines compared to dynamic ones.
  • Configure Redirect Rules in Service Center to handle changes to locales or moved content (e.g., /product-details redirects to /en/product-details). Use HTTP 301 (permanent) redirects for SEO effectiveness. SEO-friendly URLs for Reactive Web apps

4. Best Practices

  • Include a language switcher (dropdown or flags) in your application's UI to make it easy for users to switch languages. Ensure the switch updates the URL with the correct locale path or query string.
  • Use a dynamic page title that changes based on the locale. For example, the title for /en/home could be "Welcome" while being "Bienvenido" for /es/home. Set dynamic titles in Service Studio using expressions. SEO-friendly URLs for Reactive Web apps
  • Regularly check your URL prioritization and verify that search engines prefer your localized pages.

By following these guidelines, you can efficiently implement language locale in the URLs of your OutSystems 11 Reactive application while optimizing it for SEO.

This answer was AI-generated. Please read it carefully and use the forums for clarifications
2024-03-22 09-17-23
Chandra Vikas Sharma

Hi Neo,

However, we are not able to configure this in Service Studio. Specifically, we are unable to edit the Page Name / URL Pattern to include the {Locale} variable before the page name (e.g., {Locale}/Home). Service Studio does not allow us to add {Locale} before the page name as described in the documentation.

Could you please advise if this configuration is supported in OutSystems 11 Reactive applications? If so, could you share the recommended approach or steps to implement it?

Thanks,Chandra Vikas Sharma

2021-11-12 04-59-31
Manikandan Sambasivam

Dear Chandra,

Please try this approach

  • Add an input parameter to each screen.

  • Pass the language code through the query string.

  • Configure the redirect rules from Service Center.



2024-03-22 09-17-23
Chandra Vikas Sharma

Hi @Manikandan Sambasivam,

Thanks for your reply.

We would like to clarify the requirement. We need to add the locale parameter immediately after the domain name, not at the end of the URL. Currently, we have already achieved the locale parameter at the end of the URL.

Please see the examples below:

Current URL: (already done)

www.mydomain.com/ModuleName/PageName/en-US

Desired URL:  (we need solution for this

)www.mydomain.com/en-US/ModuleName/PageName

Thanks

CV

2021-11-12 04-59-31
Manikandan Sambasivam

Hi @Chandra Vikas Sharma ,

You only need to update the Redirect URL in the Service Center.

I have shared the screenshots with you via email, as the customer portal address shown in the screenshots cannot be shared on the forum.


2021-11-12 04-59-31
Manikandan Sambasivam


Hi All,

Could you please let me know the reason for the dislike? I tested the solution before posting my reply in the thread and shared it based on my findings. Since I spent time validating it before responding, it would be helpful to understand the concern so I can improve the response if needed.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.