Mobile app version of vmapp.org
Login or Join
Murphy175

: Translate URL query parameters Just like it is always advisable to translate URL parts in order to internationalize a web site, is there any recommendation (W3C or such) regarding the translation

@Murphy175

Posted in: #BestPractices #Internationalization #Recommendations

Just like it is always advisable to translate URL parts in order to internationalize a web site, is there any recommendation (W3C or such) regarding the translation of URL parameters (query strings)?

Example of translating URLs along with its parameters:

English: /store/products/?sort=descending&filter=free-delivery
Spanish: /almacén/productos/?orden=descendiente&filtro=reparto-gratis

I have tried to research about this many times, but so far nobody seems to ever consider the localization of URL parameters.

Note: not all URLs with query parameters must or can be made into a "friendly" URL. Per-spec, URL parameters are meant to pass hints such as how to view certain content, that is why the sort=descending parameter is appropriate.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy175

1 Comments

Sorted by latest first Latest Oldest Best

 

@Annie201

If you can, I'd suggest switching to friendly URLs. For example:
www.example.com/section/one

instead of:
www.example.com/index.php?section=one
However, if you MUST use query strings in the address bar, then stick with alpha-numeric characters and use equals to separate names from values, and the ampersand to separate sets of name-value pairs. the first question mark in the URL is the indicator that the query string begins.

If you need to use fancy characters in the URL, then you need to percent-encode them. For example, to use a space in the URL, you need to add "%20" instead of " " because 20 is hex for 32 which is ascii for space.

Go to this url for more info:
en.wikipedia.org/wiki/Percent-encoding

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme