开发者

How are these called? literals, captions, labels or properties?

Instead of hardcoding text in the UI we use placeholders with keys which get replaced by the actual text. This also helps localisation of the application.

example Java properties file:

about=About
contact=Contact Us

These could also be found in the database or in XML files etc

How are these called?

  • literals?
  • captions?
  • labels?
  • properties?

I'm looking for a general and language agnostic term.

Edit: Adding all the suggested terms from answers:

  • translatable strings
  • resource strings
  • Resource Properties
  • localization
  • Culture Variant UI Fields
  • Locales
  • Locales Strings
  • messages
  • message 开发者_运维百科placeholders

I don't know why but it kind of saddens and confuses me that there isn't a single solid term to describe this thing. And in one way or another it exists in all languages and frameworks.


They are called resource strings, on many platforms, independent of what you are using them for. There isn't a general name for the individual resource strings related to localization. The general term for all of those resource strings together is called localization.


The basic terms to understand the translation context are:

Localization (L10n) and Internationalization (I18n)

Both terms describe the creation of internationalized systems which are able to adapt on the locale and language of the user. Here is a good explanation of both terms from user Hank Gay: Localization and internationalization, what's the difference?.

Therefore, terms like "Locale" are too broad, whereas "Resource Properties" are too unspecific. "Culture Variant UI Fields" does not fit properly because the translated texts do not need to appear in UI fields, as they also can be used in mail texts or in other contexts.

In my opinion the best way to describe the properties is to take the terms "language" and "translation" into account. So the best match would be: Message Translation


I'd call them 'translatable strings', but I guess it would depend on the context.


"Locales" or "Locale Strings".


The mentioned items are termed as "Resource Strings". Resource strings can be further classifed into localized strings.

Consider the following example :-

When the culture is US-en (US English ) A constant named WELCOME in US English can refer to "Welcome" in the resource string.

When the culture is FR-fr ( France French )

The same constant WELCOME shall refer to "Bonjour" in the resource string. Obviously you have to correlate the WELCOME constant to "Bonjour" . As a side note, there are a wide variety of tools available for translation of entire projects in different locales .

P.S. I am not a French expert , so forgive me I was wrong in the translation of Welcome to Bonjour .:-)


I would say they are called Resource Properties


How about "message placeholder" for the string in your UI that gets replaced, "message ID" for the keys and "message string" (or "message (text|value)" for better pronounceability) for the actual string that gets "printed".


As far as I know, there's no technology- or language-agnostic name agreed for this.

For two examples, the .NET Framework has a name for such placeholders: resources, while HTML uses embedded content to refer to content that is imported from one document into another UI strings I wouldn't favor literal, because it has a specific meaning in .NET, begging to make it a confusing term (although it would certainly not be the first).

Looking at the characteristics: not embedded, not hardcoded, placeholder, loadable from DB/XML, key/value pair lookup, culture-dependent, culture-specific, localizable...

I think if I would go with Culture Variant UI Fields, that is, a post-compilation modifiable placeholder (field) that holds a string value for display to the user (UI), that should change depending on the user's location preference (culture variant). I explicitly mention the UI, because there are other operations that may require culture-awareness (like sorting, for example), that can happen in the background, but are not directly displayed to the user.

The advantage of using this definition is that it could be extended to refer to other localizable elements, such as images, text files, XML configurations, etc.


I'd call them "User Visible Strings" because it seems to me that's the most important attribute they have; they are visible to the user and hence must be localized.


Django docs call it translation strings: https://docs.djangoproject.com/en/dev/topics/i18n/#term-translation-string

Same term re PHP: http://www.ejeliot.com/blog/113


I call them "localizable strings".

For me , "resource" sounds more general, it would include images and such. And "message" is less general, I would not call something like menu label a "message".


I'd use Web Constants or Message Constants or UI Constants.

Properties file can be named as WebConstants_en.properties or WebConstants_it.properties etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜