ShopifyLocalization class
ShopifyLocalization provides various methods related to the localization.
- Mixed-in types
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkForError(
QueryResult< Object?> queryResult, {String? key, String? errorKey}) → void -
throws a
OperationExceptionif the operation was wrong throws a ShopifyException if shopify reports an errorinherited -
getLocalization(
{String? countrycode, String? languageCode}) → Future< Localization> - Returns an instance of Localization.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setCountryCode(
String? countryCode) → void - Sets the country code. Used to change currency units. eg: "US", "NP", "IN" etc. Must be an ISO 3166-1 alpha-2 code (2 characters).
-
setLanguageCode(
String? languageCode) → void -
Sets the language code.
Used to change language code, eg: "EN", "DE", "FIL", "ZH_CN" etc.
Accepts ISO 639-1 codes and Shopify locale variants (
PT_BR,ZH_TW). Hyphens are normalized to underscores (e.g.zh-CN→ZH_CN). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- countryCode → String?
-
get country code.
no setter
- instance → ShopifyLocalization
-
Singleton instance of ShopifyLocalization
final
- languageCode → String?
-
get language code.
no setter