Main menu

Adding new translatable assets to a Loco project

If you have permission to create new assets you will see a "New asset" button with an :add icon: in your project management view. Clicking this opens a modal window where you can enter the following:

Source text

This adds the initial source text in your default language. This isn't actually an asset property, it's the default translation. If you need to change it later you can edit it like any other translation.

If you don't want a source translation to begin with, just leave this blank and fill out the asset ID field instead.

Asset ID

If you have developer permissions you can set a specific asset ID here. Loco requires every asset has a unique, primary ID, but depending on your target platform you may not have to pay them any attention.

Leaving this field blank will generate one automatically according to your developer settings.

Context

Some platforms support a context attribute to disambiguate similar texts. You can enter this now, or change it later. It doesn't affect the asset ID, but it can be used in combination with your source text if you need to identify multiple strings by the same original text.

Type

Plain text
Plain text assets can hold any data you can enter with a keyboard, but Loco will only understand it as text. For example: you can enter XML without a problem, but exporting it into an XML file would result in escaped literal text, not embedded XML code.

HTML formatted
Although you can use plain text assets to hold HTML, choosing this type presents a visual "rich text" editor to your translators. This is convenient for simple formatting such as bold and links. It also tells Loco how to deal with the content in certain situations, such as exporting Android styles.

XML fragment
XML assets are useful if you're exporting to XML files and need to embed markup that Loco would otherwise treat as text. You will be warned if your text is not valid XML, but it will still be exported exactly as you entered it.

Tags

You can add one or more tags to your asset when it's created. Typing the name of an existing tag will display an auto-complete dropdown. Hit return to enter more than one tag. If you have permission to add new tags to a project then any non-existent tags entered will be created automatically.

Notes

This field can be used for additional information explaining what the text is about, or what the asset is for. The text appears in the translation editor along side the source language text.

As with all asset properties, the same notes are shown regardless of the language being translated, or which source language the translator prefers to reference. You can think of this field as analogous to source code comments that might accompany the text in your application.

Updating existing asset properties

You can update an Asset's properties by clicking its :cog icon: from the project management view.

The Asset ID, Context, Type, Tags and Notes fields are all documented above. The source text is not actually an asset property, it's the default translation in your source language. Once an asset is created the source text can be edited like any other translation.

Source code attributes

If you have developer permissions you'll see an extra tab with a :code icon: when editing asset properties.

String formatting

Selecting from this dropdown tells Loco the specific printf syntax that the translations of the asset will contain.

  • If your translations will never contain formatting tokens (like "%s") then you can leave this field as "No format defined".
  • If you have text that isn't intended to be formatted (like "20% off") you can select "Disabled" to suppress formatting hints.
  • Setting a specific platform here tells Loco what format the texts are currently in. It does not modify the text.

This is a detailed topic, see the developer's guide if you are working with formatted strings.

File references

If you imported your asset from a file, this field will contain references specific to the source file format. There is little point in editing these, and generally they are preserved as is for exporting to file again. However, the field is editable should you have reason to modify this property.

See also

Last updated by