Internationalization and Localization

Internationalization and localization, abbreviated i18n and l10n, respectively, are a means of adapting computer software to different languages.

  • Internationalization is the process of developing software to support various languages.
  • Localization is the process of displaying the content in one of those languages.

NYC.ID content has been internationalized for all languages supported by the Google Cloud Translation API.

If a user will access NYC.ID via a Web browser that is not set to his or her native-language locale (e.g., a kiosk), your application should follow the steps below to explicitly set the language of NYC.ID.

 

Specifying a Language

To specify a language, your application must use the "lang" parameter with one of the above language codes.

! IMPORTANT: The language code specified by the "lang" parameter is stored in the HTTP session.

If the "lang" parameter is not specified, NYC.ID will check these locations, and will use the first language code found:

  1. the user's HTTP session
  2. the user's locale provided by his or her Web browser

If no language code is found, NYC.ID will use the default language code, en.

! IMPORTANT: When including a Country Code with the Language Code, separate them with an underscore (e.g., zh_CN).

 

Google Translate

A user may click the Translate link in the NYC.ID header to translate the content into another language. If the user does this, the Translate link changes to Select Language. Google Translate will translate all of the content on the NYC.ID page, including the header and footer.