Class: Google::Apis::TranslateV3::SupportedLanguage

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/translate_v3/classes.rb,
lib/google/apis/translate_v3/representations.rb,
lib/google/apis/translate_v3/representations.rb

Overview

A single supported language response corresponds to information related to one supported language.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SupportedLanguage

Returns a new instance of SupportedLanguage.



2026
2027
2028
# File 'lib/google/apis/translate_v3/classes.rb', line 2026

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#display_nameString

Human-readable name of the language localized in the display language specified in the request. Corresponds to the JSON property displayName

Returns:

  • (String)


2005
2006
2007
# File 'lib/google/apis/translate_v3/classes.rb', line 2005

def display_name
  @display_name
end

#language_codeString

Supported language code, generally consisting of its ISO 639-1 identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes including language and region identifiers are returned (for example, 'zh-TW' and 'zh-CN'). Corresponds to the JSON property languageCode

Returns:

  • (String)


2012
2013
2014
# File 'lib/google/apis/translate_v3/classes.rb', line 2012

def language_code
  @language_code
end

#support_sourceBoolean Also known as: support_source?

Can be used as a source language. Corresponds to the JSON property supportSource

Returns:

  • (Boolean)


2017
2018
2019
# File 'lib/google/apis/translate_v3/classes.rb', line 2017

def support_source
  @support_source
end

#support_targetBoolean Also known as: support_target?

Can be used as a target language. Corresponds to the JSON property supportTarget

Returns:

  • (Boolean)


2023
2024
2025
# File 'lib/google/apis/translate_v3/classes.rb', line 2023

def support_target
  @support_target
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2031
2032
2033
2034
2035
2036
# File 'lib/google/apis/translate_v3/classes.rb', line 2031

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @language_code = args[:language_code] if args.key?(:language_code)
  @support_source = args[:support_source] if args.key?(:support_source)
  @support_target = args[:support_target] if args.key?(:support_target)
end