Translation of mshoplib
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Translation of mshoplib
Hello,
I am able to provide my own translations for strings in the client domain. However, I did not yet find a way to translate the strings in the files in this directory:
Libraries/aimeos/aimeos-core/lib/mshoplib/i18n/
I tried to create en.po and de.po files (and started msgfmt) in
Resources/Private/Extensions/[my extension]/client/i18n/mshop
and also in
Resources/Private/Extensions/[my extension]/client/i18n
Resources/Private/Extensions/[my extension]/lib/mshop
None of these worked. Where is the proper location?
I also tried to provide the translation via typoscript:
plugin.tx_aimeos.settings.i18n.de.0 {
domain = mshop
string = Products out of stock
trans = Das Produkt ist nicht mehr in ausreichender Zahl auf Lager.
}
Still no luck. (Tried with domain mshoplib, too.)
How can I translate the content of mshoplib ?
Claudia
I am able to provide my own translations for strings in the client domain. However, I did not yet find a way to translate the strings in the files in this directory:
Libraries/aimeos/aimeos-core/lib/mshoplib/i18n/
I tried to create en.po and de.po files (and started msgfmt) in
Resources/Private/Extensions/[my extension]/client/i18n/mshop
and also in
Resources/Private/Extensions/[my extension]/client/i18n
Resources/Private/Extensions/[my extension]/lib/mshop
None of these worked. Where is the proper location?
I also tried to provide the translation via typoscript:
plugin.tx_aimeos.settings.i18n.de.0 {
domain = mshop
string = Products out of stock
trans = Das Produkt ist nicht mehr in ausreichender Zahl auf Lager.
}
Still no luck. (Tried with domain mshoplib, too.)
How can I translate the content of mshoplib ?
Claudia
Re: Translation of mshoplib
The string you want to translate is used here in the code:
https://github.com/aimeos/aimeos-core/b ... ck.php#L69
For .po files (and the files without extension created by msgfmt) the correct location in your own extension is:
You translation for the string via TypoScript is correct:
Only make sure that you don't overwrite that translation afterwards by another one (check in TypoScript Object Browser if the translation is still there).
https://github.com/aimeos/aimeos-core/b ... ck.php#L69
For .po files (and the files without extension created by msgfmt) the correct location in your own extension is:
Code: Select all
Resources/Private/Extensions/[my extension]/lib/custom/i18n/
Code: Select all
plugin.tx_aimeos.settings.i18n.de.0 {
domain = mshop
string = Products out of stock
trans = Das Produkt ist nicht mehr in ausreichender Zahl auf Lager.
}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Translation of mshoplib
Thank you. It works now for translating "Products out of stock", but not for "product.stock.notenough". Both are in the same file:
Translation in en.po
msgid "Products out of stock"
msgstr "Some products are out of stock in the requested quantity."
msgid "product.stock.notenough"
msgstr "Quantity was reduced to max. available quantity."
Translation in de.po
msgid "Products out of stock"
msgstr "Produkt nicht mehr in ausreichender Anzahl auf Lager."
msgid "product.stock.notenough"
msgstr "Menge wurde auf max. verfügbare Menge reduziert."
Any clue for this?
Translation in en.po
msgid "Products out of stock"
msgstr "Some products are out of stock in the requested quantity."
msgid "product.stock.notenough"
msgstr "Quantity was reduced to max. available quantity."
Translation in de.po
msgid "Products out of stock"
msgstr "Produkt nicht mehr in ausreichender Anzahl auf Lager."
msgid "product.stock.notenough"
msgstr "Menge wurde auf max. verfügbare Menge reduziert."
Any clue for this?
Re: Translation of mshoplib
The translation domain for the plugin codes is "mshop/code":
https://github.com/aimeos/ai-client-htm ... #L701-L716
https://github.com/aimeos/ai-client-htm ... #L701-L716
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Translation of mshoplib
Why doesn't this work then?
plugin.tx_aimeos.settings.i18n.de.0 {
domain = mshop/code
string = product.stock.notenough
trans = Menge wurde auf max. verfügbare Menge reduziert.
}
plugin.tx_aimeos.settings.i18n.en.0 {
domain = mshop/code
string = product.stock.notenough
trans = Quantity was reduced to max. available quantity.
}
I checked in the TypoScript object browser: These settings are available.
plugin.tx_aimeos.settings.i18n.de.0 {
domain = mshop/code
string = product.stock.notenough
trans = Menge wurde auf max. verfügbare Menge reduziert.
}
plugin.tx_aimeos.settings.i18n.en.0 {
domain = mshop/code
string = product.stock.notenough
trans = Quantity was reduced to max. available quantity.
}
I checked in the TypoScript object browser: These settings are available.
Re: Translation of mshoplib
What doesn't work? Your TypoScript code doesn't change the translation of the string that belongs to the code
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Translation of mshoplib
The translation does not work. I tried in the .po files and in TypoScript, but nothing works out.
Re: Translation of mshoplib
You mean "product.stock.notenough" isn't translated at all?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Translation of mshoplib
The translation is the standard provided by aimeos. However, I would like to change the standard translation. And although I tried different ways, I did not succeed.
Re: Translation of mshoplib
So this doesn't change the translation of the error message at all?
Code: Select all
plugin.tx_aimeos.settings.i18n.de.1000 {
domain = mshop/code
string = product.stock.notenough
trans = Menge reduziert
}
plugin.tx_aimeos.settings.i18n.en.1000 {
domain = mshop/code
string = product.stock.notenough
trans = Quantity reduced
}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star