I have multilingual application using laravel 6.2, and i want to translate terms imported from the database, so I use the following code:
<td>{{ __($specs) }}</td>
Examples of some specs in json file:
"Display" : "Monitor",
"Processor" : "Procesador",
"RAM" : "RAM",
"Rear Camera" : "Cámara trasera",
Until now, everything is fine.
But the problem is when importing variable expressions, for example:
5 inches
5.5 inches ...
143 grams
165 grams ...
I don't want to do this every time
"5 inches" : "5 pulgadas",
"6.5 inches" : "6.5 pulgadas",
"5.61 inches" : "5.61 pulgadas",
"6.54 inches" : "6.54 pulgadas",
"7 inches" : "7 pulgadas",
.
.
.
Is there a way to translate the word "inches" and "grams" only ?