Capturing Content

Creating Unique Strings with Namespaces in the GDN

This article is for when you want to translate the same string uniquely across different pages or HTML elements of your website, using the GDN.

By default, strings are shared across all pages of your GDN site, regardless of their contextual meaning. While this approach reduces translation word count and potentially saves immediate translation cost, it might pose challenges when you need to translate the same strings on different pages uniquely. For example, "Support" may be used on your website in a number of different ways, with varied meaning depending on which page it is located on.

The GDN can be configured to assign namespaces to different URLs or specific HTML elements (e.g. header, footer), so strings are only shared within the same namespace. Having different namespaces for different URLs also makes it easier to identify/manage strings specific to each URL. Having different namespaces for specific HTML elements on a page means that if your webpage is divided appropriately, you could have the same string translated uniquely in the header, the footer, and the body of the page.

However, if your site loads the same content from multiple sources/URLs (e.g. HTML, API, search results), using URL based namespaces may cause string count to double.

If you are interested in adjusting the namespace behavior for your GDN integration, please contact your Smartling Customer Success Manager or Solution Architect.

Was this article helpful?