Internationalization and localization tools


Culture-Sensitive C# Method

using System.Text

public StringBuilder Append(bool value);
public StringBuilder Append(byte value);
public StringBuilder Append(char value);
public StringBuilder Append(char[] value);
public StringBuilder Append(decimal value);
public StringBuilder Append(double value);
public StringBuilder Append(short value);
public StringBuilder Append(int value);
public StringBuilder Append(long value);
public StringBuilder Append(Object value);
public StringBuilder Append(sbyte value );
public StringBuilder Append(float value);
public StringBuilder Append(string value);
public StringBuilder Append(ushort value);
public StringBuilder Append(uint value);
public StringBuilder Append(ulong value);
public StringBuilder Append(char value, int repeatCount);
public StringBuilder Append(char[] value, int startIndex, int charCount);
public StringBuilder Append(string value, int startIndex, int count);

Internationalization (I18n) Function Overview

The Append method appends the string representation of the specified parameter to the end of this StringBuilder instance.

See Microsoft's MSDN online documentation for more information.

I18n Issues

In an internationalized application, Append should not be used if the resulting string is to be displayed to the User. This is because the order of the translated pieces of the string can be different for each Culture. In addition, there are other i18n issues concerning these specific Append parameter data types:

  • Byte - this data type cannot hold a Unicode character, which is two bytes. Use the Char version of the call, which does support Unicode characters.
  • Boolean - this will be converted to the string "True" or "False", which, in a non-English application, will need to be translated.
  • Double - the floating point number will be converted to a string based on the current Culture. As this may result in a different decimal point separator, ensure that the Culture is properly set.
  • Recommended Replacements

    Use String.Format to manage dynamic string creation.

    Culture and Number Format Information

     

    Lingoport internationalization and localization services and software