Table of Contents

Class StringCatWriter

Namespace
Tlumach.Writers
Assembly
Tlumach.Writers.dll

A writer for Apple String Catalog files (.xcstrings). A single output file contains translations for all supplied locales.

public class StringCatWriter : BaseJsonWriter
Inheritance
StringCatWriter
Inherited Members

Properties

ConfigExtension

Gets the extension of the configuration files of the format, with the leading dot (e.g., ".jsoncfg"), or an empty string if the writer does not write configuration files.

public override string ConfigExtension { get; }

Property Value

string

FormatName

Gets the name of the format (e.g., "JSON" or "RESX"), which is also used in error messages.

public override string FormatName { get; }

Property Value

string

TranslationExtension

Gets the extension of the translation files of the format, with the leading dot (e.g., ".json").

public override string TranslationExtension { get; }

Property Value

string

Methods

InternalWriteTranslations(TranslationManager, IReadOnlyCollection<CultureInfo>, Stream)

Writes translations.

protected override void InternalWriteTranslations(TranslationManager translationManager, IReadOnlyCollection<CultureInfo> cultures, Stream stream)

Parameters

translationManager TranslationManager

The translation manager from which the translations should be picked.

cultures IReadOnlyCollection<CultureInfo>

The list of cultures to write.

stream Stream

The stream to write the resulting file to.

WriteTranslations(TranslationManager, IReadOnlyCollection<CultureInfo>, Stream)

Always throws an exception, as the format does not support multiple languages in one file. Use WriteTranslation(TranslationManager, CultureInfo, Stream) instead.

public override void WriteTranslations(TranslationManager translationManager, IReadOnlyCollection<CultureInfo> cultures, Stream stream)

Parameters

translationManager TranslationManager

The translation manager from which the translations should be picked.

cultures IReadOnlyCollection<CultureInfo>

The list of cultures to write.

stream Stream

The stream to write the resulting file to.

Remarks

Overrides the base implementation (which throws) to support writing all locales into a single .xcstrings file.

Exceptions

TlumachException

Always.