HTTP Language Codes Reference

A reference guide for understanding and using HTTP language codes (language tags) within the platform.

Understanding HTTP Language Codes

HTTP language codes, also known as language tags, are standardized codes used to identify human languages in web applications and browsers. These codes follow the BCP 47 format and are essential for proper language targeting in Traffic Creator.

Language codes typically consist of:

  • Primary language subtag - A 2 or 3 letter code representing the base language (e.g., "en" for English)
  • Region subtag - Optional 2-letter country code to specify regional variants (e.g., "US" for United States)
  • Script subtag - Optional 4-letter code for the writing system (e.g., "Latn" for Latin script)
  • Variant subtags - Optional codes for specific language variants

Common Language Codes

Here are the most commonly used language codes in Traffic Creator:

Language Code Language Region/Variant
en English Generic English
en-US English United States
en-GB English United Kingdom
es Spanish Generic Spanish
es-ES Spanish Spain
es-MX Spanish Mexico
fr French Generic French
fr-FR French France
fr-CA French Canada
de German Generic German
de-DE German Germany
zh Chinese Generic Chinese
zh-CN Chinese Simplified (Mainland China)
zh-TW Chinese Traditional (Taiwan)
ja Japanese Japan
ko Korean Korea

Using Language Codes in Traffic Creator

Language codes are used in several areas of Traffic Creator:

Browser Language Settings

When configuring browser language preferences for your traffic, you can specify:

  • Primary language (required) - The main language the browser will report
  • Secondary languages (optional) - Additional languages in order of preference
  • Accept-Language header format - How the languages will appear in HTTP requests

Geo-Targeting Integration

Language codes work in conjunction with geo-targeting to create realistic user profiles:

  • Automatic language matching based on selected countries
  • Custom language overrides for specific targeting needs
  • Regional variants to match local dialects and preferences
Pro Tip: For the most realistic traffic patterns, match your language settings with your geo-targeting selections. For example, use fr-CA for traffic from Canada rather than fr-FR.

Best Practices

Follow these guidelines when using language codes in your traffic campaigns:

  • Use specific regional variants when targeting specific countries (e.g., pt-BR for Brazilian Portuguese)
  • Include multiple languages for countries with multiple official languages (e.g., Canada, Switzerland)
  • Match language distribution to realistic demographics of your target regions
  • Consider browser preferences - Chrome users often have different language settings than Firefox users
  • Test language detection on your website to ensure proper content localization

Troubleshooting

If you encounter issues with language settings in your traffic campaigns:

Language Not Detected by Analytics

  1. Verify that your language codes are correctly formatted (e.g., en-US not en_US)
  2. Check that your website's analytics platform supports language detection
  3. Ensure your traffic settings have browser language options enabled
  4. Test with a single language before adding multiple languages

Content Not Localizing Properly

  1. Confirm your website's language detection is working correctly
  2. Test with browser language settings manually to verify functionality
  3. Check if your website uses IP-based detection instead of browser headers
  4. Verify that your content management system has proper localization setup

Conclusion

Understanding and properly implementing HTTP language codes is essential for creating realistic traffic patterns in Traffic Creator. By using the correct language codes and following best practices, you can ensure your traffic accurately represents your target audience's language preferences and improves the effectiveness of your website testing and optimization efforts.

For more detailed information about language codes, refer to the IANA Language Subtag Registry, which maintains the official list of all valid language codes.

Created on

September 15, 2023

Last updated

May 20, 2024

Need More Help?

Can't find what you're looking for? Our support team is here to help.

Contact Support