laravel-translatable
  • Introduction
  • Issues
  • Changelog
  • FAQ
  • Installation
  • Package
    • Interface
    • Methods
    • Scopes
    • Fallback locale
    • Locales helper
    • Validation Rule Factory
  • Usage
    • Attributes
    • Forms
    • Pivot Model
    • Custom Validation Rules
Powered by GitBook
On this page
  • v11
  • v11.11.0
  • v11.10.0
  • v11.9.1
  • v11.9.0
  • v11.8.3
  • v11.8.1
  • v11.8.0
  • v11.7.1
  • v11.7.0
  • v11.6.1
  • v11.6.0
  • v11.5.2
  • v11.5.1
  • v11.5.0
  • v11.4.0
  • v11.3.0
  • v11.2.1
  • v11.2.0
  • v11.1.3
  • v11.1.2
  • v11.1.1
  • v11.1.0
  • v11.0.0
  • v10.0.0
  • v9
  • v9.5.0
  • 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
  • v6.0.1
  • v6.0.0
  • v5
  • v5.6.1
  • v5.6.0
  • v5.5.1
  • v5.5.0
  • v5.4
  • v5.3
  • v5.2
  • v5.1.2
  • v5.1.1
  • v5.1.0
  • v5.0.1
  • v5.0.0
  • v4
  • v4.5.0
  • v4.4.0
  • v4.3.0
  • v4.2.0
  • v4.1.1
  • v4.1.0
  • v4.0.0
  • v3.0.0
  • v2.0.0
  • v1.0.0

Was this helpful?

Changelog

PreviousIssuesNextFAQ

Last updated 1 year ago

Was this helpful?

v11

v11.11.0

  • Change \Astrotomic\Translatable\Traits\Relationship::translation() relation to use the new ofMany -

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

  • Fix all methods visibility to allow customization -

v11.9.0

  • Add Laravel 8 support -

v11.8.3

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

v11.8.1

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

v11.5.2

v11.5.1

v11.5.0

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 \Astrotomic\Translatable\Contracts\Translatable interface

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

  • 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

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

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

  • Added compatibility with Laravel v5.4.

v6

v6.1.0

v6.0.1

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

  • Added Laravel 5.2 support

  • Dropped Laravel 5.0 support

v5.4

v5.3

v5.2

  • Added new scope withTranslation()] to decrease the number of mysql calls made.

v5.1.2

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

v5.1.1

v5.1.0

  • 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.

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

  • 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 travis environment for laravel 4.2.

v4.0.0

v3.0.0

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

Fix custom locale column name in \Astrotomic\Translatable\Traits\Relationship::translation() method -

Add Laravel 7 support -

Add .gitattributes to exclude files from archive -

Add translateOrFail() method -

Fix PHP translation cascade deletion -

Add PHP side translation cascade deletion - (disabled by default)

Fix scope orderByTranslation() to return all translations -

Fix getTranslationByLocaleKey() to use translation relation if possible -

Add rule parsing to \Astrotomic\Translatable\Validation\RuleFactory -

Add Laravel 6 support -

Add \Astrotomic\Translatable\Validation\RuleFactory -

Fix duplicate checks of same locale -

Add auto fallback locale finder -

Fix conflict between attributes and locales during fill() -

Refactor translation relationship -

Add missing return type-hints -

Add missing dependencies illuminate/contracts and illuminate/database -

Add translation relationship -

Update the where translation scopes to unify them and remove duplicated code -

Add PHP7 type-hints

Move to Astrotomic &

Add Dimsav\Translatable\Locales helper class

Fix getRelationKey()

drop custom save method in favor of saved event listener

Add isEmptyTranslatableAttribute() method to allow custom empty attribute decision logic

Add Laravel 5.8 support &

Fix n+1 queries when updating non-translated model attributes

Add support for Laravel 5.7

Do not call get translation with fallback locale and fallback enabled

Allow translateOrDefault() and translateOrNew() to default to user app locale

Change autoload translations behavior on runtime

Use fallback in attributesToArray()

Added orderByTranslation() scope

Example in doc for locale filtering in whereTranslation() scope

Fire saving event in every case

Allow to change default translation model namespace from config file

Added support for Laravel 5.6

Fixed error when fallback not available.

Fixed withTranslation query scope performance

Fixed fallback for country-based locales

Fixed empty attribute values

Added support for Laravel 5.5

Added compatibility with custom db connections.

Fixed delete events not fired for translations.

Added replicateWithTranslations().

Added orWhereTranslation() and orWhereTranslationLike() scopes.

Added support for laravel auto-discovery.

Added tag for publishing the config file.

Added fallback per attribute.

Added getTranslationsArray()

Fixed filling 'property:locale' format was not validating the locale.

Added default locale per model.

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

Added config to skip translations in toArray() for better performance when needed.

Fix issue when trying to fetch a translation with a country based locale

Added support for Lumen without Facades

Added support for Model accessors

Updated code style and added to enforce it

Added scope notTranslatedIn()

Added scope whereTranslationLike()

Fire 'updated' event when saving translations.

setAttribute() returns the model itself, which is now the default in eloquent.

Added compatibility with custom primary key

Added whereTranslation() scope

Added option to override default locale

Added default value in translatedIn() scope

Added about scopes.

Fixed bug when using syntax $country->{'name:en'} and locale doesn't exist

Method isTranslationAttribute() is now public

Fixed compatibility with Lumen

Fixed making an attribute on a translatable model hidden does not hide it

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

Force fire "saved" event when the original model is not saved, but the translation is

The Translation class suffix default can be overridden in the app config. See

The app.fallback_locale setting can be overridden in each model separately. See

Added fallback to default locale if translations is missing.

Removed syntax $model->en->name because conflicts may happen if the model has a property named en. See .

Added method hasTranslation($locale). See .

Fixed bug . Model's Translations were deleted when the model delete failed.

#297
#198
#180
#146
#128
#126
#114
#105
#98
#72
#49
#56
#52
#34
#40
#36
#38
#23
#16
#9
#3
#2
#557
#1
#4
#574
#575
#567
#576
#550
#556
#533
#518
#502
#500
#501
#503
#504
#487
#457
#508
#435
#422
#417
#417
#410
#394
#366
#361
#346
#338
#359
#360
#348
#347
#356
#271
#314
#315
#264
#259
#257
styleci
#235
#183
#190
#201
#174
#168
#158
#148
documentation
#150
#151
#121
#133
@barryvdh
#85
7ecc0a75d
#33
#23
#18
#19
#7