Changelog

v11

v11.11.0

  • Change \Astrotomic\Translatable\Traits\Relationship::translation() relation to use the new ofMany - #297arrow-up-right

v11.10.0

  • Drop PHP7 support

  • Drop Laravel 5.8 and 6 and 7 support

  • Add Laravel 9 support

  • Add PHP8.1 support

v11.9.1

v11.9.0

v11.8.3

  • Fix \Astrotomic\Translatable\Exception\LocalesNotDefinedException exception message

v11.8.1

  • Fix custom locale column name in \Astrotomic\Translatable\Traits\Relationship::translation() method - #146arrow-up-right

v11.8.0

v11.7.1

v11.7.0

v11.6.1

v11.6.0

  • Drop PHP 7.1 support

  • Drop Laravel 5.6 & 5.7 support

  • Add PHP side translation cascade deletion - #98arrow-up-right (disabled by default)

v11.5.2

v11.5.1

  • Fix getTranslationByLocaleKey() to use translation relation if possible - #49arrow-up-right

v11.5.0

  • Add rule parsing to \Astrotomic\Translatable\Validation\RuleFactory - #56arrow-up-right

v11.4.0

v11.3.0

v11.2.1

v11.2.0

v11.1.3

v11.1.2

v11.1.1

v11.1.0

  • Add missing dependencies illuminate/contracts and illuminate/database - #9arrow-up-right

  • Add \Astrotomic\Translatable\Contracts\Translatable interface

  • Split \Astrotomic\Translatable\Translatable into multiple traits - but use them in the main one

  • Add translation relationship - #3arrow-up-right

  • Flag methods, not defined in interface as @internal

  • Rename getRelationKey() to getTranslationRelationKey() to prevent conflicts - the original one is @deprecated and will be dropped in next major release

  • Update the where translation scopes to unify them and remove duplicated code - #2arrow-up-right

v11.0.0

migrate from dimsav to astrotomic

  1. upgrade to dimsav/laravel-translatable:v10.0.0

  2. run composer remove dimsav/laravel-translatable

  3. run composer require astrotomic/laravel-translatable

  4. replace Dimsav\ by Astrotomic\ in your whole project (namespace change)

v10.0.0

v9

v9.5.0

  • Add isEmptyTranslatableAttribute() method to allow custom empty attribute decision logic #576arrow-up-right

v9.4.0

v9.3.0

v9.2.0

v9.1.0

v9.0.0

v8

v8.1.0

v8.0.0

v7

v7.3.0

v7.2.1

v7.2.0

v7.1.0

v7.0.0

v6

v6.1.0

  • Filling a model now supports using the 'property:locale' format in keys. #314arrow-up-right For example: $country->fill(['name:en' => 'Belgium'])

  • Added config to skip translations in toArray() for better performance when needed. #315arrow-up-right

v6.0.1

  • Fix issue when trying to fetch a translation with a country based locale #264arrow-up-right

v6.0.0

  • Translated fillable properties should only be defined in the translation model.

    • To update from version 5, move all the fillable properties belonging to a translation to the corresponding translation models.

  • Added deleteTranslations() method for conveniently deleting translations

v5

v5.6.1

v5.6.0

v5.5.1

  • Fixed a bug in locale fallback on toArray()

v5.5.0

v5.4

v5.3

v5.2

v5.1.2

  • Fixed db in tests is dropped and recreated to make tests more stable

  • Fixed bug when using syntax $country->{'name:en'} and locale doesn't exist #150arrow-up-right

  • Method isTranslationAttribute() is now public #151arrow-up-right

v5.1.1

v5.1.0

  • Added mutator/accessor translations using the format $country->{'name:de'} thanks to @barryvdharrow-up-right

  • Added documentation in readme file

v5.0.1

  • Applied PSR-2 code style.

v5.0.0

  • Laravel 5 ready

  • Added configuration option for returning fallback translations

v4

v4.5.0

  • Added scope to list translated attributes in the current locale.

  • Force fire "saved" event when the original model is not saved, but the translation is #85arrow-up-right

v4.4.0

  • Drops support for laravel 4.0.

  • Compatible with laravel 4.1 and laravel 4.2.

  • External config file.

  • Fallback issue fixed.

  • Added translated and translatedIn scopes.

  • Changed behavior: getting non existing translations with getTranslation() used to return objects, now null is returned.

  • Translated attributes now shown when converting toArray() or toJson().

  • Fixed bug: fill() created empty translations even when translated attributes were not fillable.

  • Added option to make translated attributes always fillable.

v4.3.0

  • The Translation class suffix default can be overridden in the app config. See 7ecc0a75darrow-up-right

  • The app.fallback_locale setting can be overridden in each model separately. See #33arrow-up-right

  • Fallback translation is not returned if it is not defined.

v4.2.0

  • Fallback locale now is taken from app.fallback_locale config key.

v4.1.1

  • Fixed issue with saving translations, caused by the update of the laravel core.

v4.1.0

  • Added fallback to default locale if translations is missing. #23arrow-up-right

  • Added travis environment for laravel 4.2.

v4.0.0

  • Removed syntax $model->en->name because conflicts may happen if the model has a property named en. See #18arrow-up-right.

  • Added method hasTranslation($locale). See #19arrow-up-right.

v3.0.0

  • Fixed bug #7arrow-up-right. Model's Translations were deleted when the model delete failed.

v2.0.0

  • Translatable is now a trait and can be used as add-on to your models.

  • 100% code coverage

v1.0.0

  • Initial version

  • Translatable is a class extending Eloquent

  • 96% code coverage

Last updated

Was this helpful?