It's possible to customize the url of other languages?

mobilu
20 Posts
mobilu posted this 20 February 2023
Wishlist

It's possible to customize the url of other languages? You use https://website.com/?pagename=name-of-page&lang=en. Can I set it up to use just https://website.com/en/page-name and hide page name on homepage and hide language when on main language=

Last edited 21 February 2023 by Support Team

Vote to pay developers attention to this features or issue.
10 Replies
Order By: Standard | Newest
Support Team
Support Team posted this 21 February 2023

Marketing,

Unfortunately, no, for now. We have added the request to our wish list.

...................................................
Sincerely,
Alan R.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Promodesk.nl
1 Posts
Promodesk.nl posted this 15 September 2023

Is this problem already solved?

Support Team
Support Team posted this 15 September 2023

Hello Marketing,

Thanks for using Nicepage!
The bug fixing is a complex process and it can take time to find and fix the problem.
We understand your frustration. We've checked the status of the bug you reported and it's still being investigated. We've also passed your message along to the team working on the bug.
We'll keep you updated on our progress.
...................................................
Sincerely,
George.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

black6crow
3 Posts
black6crow posted this 23 February 2024

Over a year has now passed. Is nothing being done here at all?
No website uses ?lang=en - today website.com/en/pagename is used everywhere - this is a standard configuration that should have a higher priority at nicepage.

I am very frustrated that this is not possible!

Support Team
Support Team posted this 24 February 2024

Hello Carnot René,

Thanks for using Nicepage!

Please create a new Separate Case and ask your question in there.

For better understanding and clarification maybe we will need your private details, project details, credentials, etc.
We may need that case to be private. We will try our best to help you.
...................................................
Sincerely,
George.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

goran.anicic
2 Posts
goran.anicic posted this 28 November 2025

We have same problem, Nicepage plugin adds /?lang=sr in all our links

goran.anicic
2 Posts
goran.anicic posted this 28 November 2025

Hello Nicepage Team,

we’ve identified an issue in the WordPress plugin that may affect many websites where Nicepage is used as a page builder, even when no multilingual setup is configured.

On a single-language WordPress site (no WPML, Polylang, TranslatePress or any similar plugin installed), Nicepage still injects ?lang= into all internal links rendered on the front-end, for example:

https://site.com/celebrity-news/maye-musk/?lang=sr
https://site.comcategory/zenski-stav/?lang=sr

This behavior leads to:

• duplicate URLs pointing to the same content
• SEO issues (duplicate content, split ranking signals)
• unnecessary URL parameters added site-wide
• broken canonical consistency

After reviewing the plugin code, we found the exact source in:

/wp-content/plugins/nicepage/includes/translations/class-np-multi-languages.php

Specifically in:

public static function disable_server_cache_for_links_script()

This function injects the following JavaScript into , which forces ?lang= into every internal anchor:

function addLangToUrls(selector, attr) {

jQuery(selector).each(function() {
    var url = jQuery(this).attr(attr);
    if (url) {
        if (url === '#' ||
            url.startsWith('#') ||
            url.indexOf('lang=') > -1 ||
            url.indexOf('tel:') > -1 ||
            url.indexOf('mailto:') > -1 ||
            url.indexOf('<?php echo $domain; ?>') === -1
        ) {
            return;
        }
        var urlParams = url.split('#');
        var anchor = urlParams[1] ? '#' + urlParams[1] : '';
        var concat = url.indexOf('?') === -1 ? '?' : '&';
        url = urlParams[0] + concat + `lang=<?php echo $language; ?>` + anchor;
        jQuery(this).attr(attr, url);
    }
});

}

This script is loaded whenever this condition is met in the same file:

if (count(NpMultiLanguages::get_supported_langs()) > 1) {

NpMultiLanguages::pre_init();

}

However, even on a single-language site, Nicepage still considers more than one language (probably via internal settings), so the multilingual feature becomes active unintentionally.

Temporary local fix (for our site)

We stopped this behavior by changing one line in the JavaScript:

Original:

url = urlParams[0] + concat + lang=&lt;?php echo $language;?&gt; + anchor;

Updated:

url = urlParams[0] + anchor;

This immediately removed ?lang=sr from all internal links.

Suggested permanent solution (for the plugin)

One of the following would prevent this issue globally:

Only enable NpMultiLanguages::pre_init() when a multilingual mode is explicitly enabled in Nicepage settings (not just because more than one language exists internally)

Add a plugin option:
“Disable automatic lang parameter injection into internal links”

Disable this feature completely for single-language WordPress sites:

if (is_multisite() && count(...) > 1 && user_enabled_multilang === true) { ... }

This behavior is critical for SEO, and on content-heavy sites it can seriously impact indexing and rankings.

If you need any additional examples, full paths, or a sandbox link, we are happy to provide it.

Support Team
Support Team posted this 30 November 2025

Hi, Goran

Thank you for finding a solution and sharing it with us.

We truly appreciate the detailed explanation. We will add this to our list of possible future improvements for the plugin. Many thanks again for your contribution.
...................................................
Sincerely,
Edgar L.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

aureliop2
11 Posts
aureliop2 posted this 03 March 2026

Hello,
I have been very satisfied using Nicepage for several years.
For SEO reasons, I need the page URLs to appear as “https://website.com/en/page-name” without “…/lang=eng”.

Question:
Is this possible by creating pages in each language and configuring the language selector menu, or do I need a plugin like WPML or Polylang?
I would prefer not to stop using Nicepage, but SEO is becoming increasingly important and, as Goran.anici says, this seems incompatible.

Thank you.

aureliop2
11 Posts
aureliop2 posted this 03 March 2026

Hello Goran,
Thank you for sharing this solution.
It seems a bit complicated.
Where would I need to include that JavaScript?
Thank you in advance.
Aurelio

You must log in or register to leave comments