Hi Martin,

thanks for coming back with the solution for the reported problem!

If you feel that the documentation needs to be clarified, you might want to register as an contributor and edit the documentation. Every help is appreciated!

Thanks,

Michael Brohl
ecomify GmbH
www.ecomify.de


Am 02.04.19 um 15:05 schrieb Martin Schröder:
Hi everyone,
I found the solution, and I have to admit I have not understood the article
about localization (
https://cwiki.apache.org/confluence/display/OFBIZ/How+to+localize+Product+and+Categories+descriptions)
correctly.

After doubting the ofbiz project and its documentation, the version of my
ofbiz installation and its configuration, I reread the localization article
and finally found out that the trick is to structure the content elements
and their data sources hierarchically (right) so they can be used by ofbiz
to supply data in the selected language for the Name and the Descripion
field of a category .

So to localize the category, in the category page I create two content
elements, one for the category name and then for the category description

    - Update Category Content Assoc


CONTENT TYPE FROM DATE THROUGH DATE EDIT CONTENT
KleidungName 10111 Category Name 2019-03-01 00:00:00.000   10111 Delete
KleidungDescription 10122 Description 2019-04-01 00:00:00.000   10122 Delete

Then I go to the "content" for each entry (buttons on the left) an there I
add a long text data source for each locale; using the "shortcut form"
below (Create Simple Text Content For Alternate Locale)


    - List Associated Content Infos


CONTENT ASSOC TYPE ID CONTENT TYPE ID LOCALE STRING
FORMFIELDTITLE_DATARESOURCETYPEID EDIT DATA RESOURCE EDIT CONTENT
Alternate Locale Document en Long Text 10120 10120
Alternate Locale Document es Long Text 10121 10121

    - Create Simple Text Content For Alternate Locale


Locale String
Text





Now when I switch the langauge in the ecommerce app, the name and the
description is displayed in the correct language.
Maybe this saves others from going in the wrong direction at first as well.

Kind regards
Martin

Am Mo., 1. Apr. 2019 um 17:36 Uhr schrieb Martin Schröder <
martin.schroede...@gmail.com>:

Hello,
could anybody give me another hint in this subject...that would be nice.
Kind regards
Martin

Am So., 31. März 2019 um 15:40 Uhr schrieb Martin Schröder <
martin.schroede...@gmail.com>:

Hi, thanks to everybody for their ideas; unfortunately it still doesnt
work for me...

I have tried it out with categories too, as I assume that the principle
of adding content in diffrent languages is the same here.
Of course it doesnt work here either... I seems that I am missing
something.

Here is the description of what I have done so far to add localisations
to my categories:

I have created for each language a category name, description and long
description content entry by using the "Add Product Category Content
(select Content Id, enter From Date)" section and the "prepare create"
button. I did this for the languages german and english.
So now my category content page (in section "Update Category Content
Assoc:") looks like this (

    - Update Category Content Assoc


CONTENT TYPE FROM DATE THROUGH DATE EDIT CONTENT
KleidungName 10111 Category Name 2019-03-01 00:00:00.000   10111 Delete
ClothingName 10112 Category Name 2019-03-01 00:00:00.000   10112 Delete
Clothing Descr 10113 Description 2019-03-01 00:00:00.000   10113 Delete
KleidungBeschr 10114 Description 2019-03-01 00:00:00.000   10114 Delete
ClothingDescrLng 10115 Description - Long 2019-03-01 00:00:00.000   10115
Delete
KleidungBeschrLng 10116 Description - Long 2019-03-01 00:00:00.000
10116 Delete

In the content page for 10111 I have  put in "de" as locale string, and
set "Kleidung" as the text.
In the content page for 10112 I have  put in "en" as locale string, and
set "Clothing" as the text.
I also have blanked out all the fields in the "override simple fields"
section of the catgory page, as Mike suggested.
The only field that cannot be blanked is " Product Category Type ".
Selection the blank here leads to an error message after hitting "update".

To prodivde more details as requested by Ankush Upadhyay
I just can add a few points that could have a relation to the subject:
I observed that only the first entries in the list are used, so in my
case the category name is displayed in German and the description in
English, regardless what language I choose in the store frontend. So it
seems there is a default setting somewhere to use content entries in their
order of appearence or my change of the locale is ingored or cannot be
processed correctly.

Question: is "de" the correct string for German, "en" for English? Maybe
I need to enter something different in the "locale string" fields of the
content entries?

Other changes I have made to my installation regarding languages are the
following:

  In the general.properties file I have changed previously the available
locales;
#locales.available=ar,de,en,es,fr,hi,it,nl,pt,ro,ru,th,zh
to
locales.available=de,en,es,fr,it
I did this to shorten the long list of languages offered in the "admin
page" .

I also have changed the default country setting for dropdowns to
# -- the default country for drop downs
country.geo.id.default=DEU

I have to add that I have created all entries for categories and products
in my catalog by using the "override simple fields" sections of these pages.
So ith first place all my ctageories and products where using the
overriden fields.
After that I have tried to add the localizations by adding content
entries and blanking out the "override" fields. Could that leave some
faulty data somewhere?

Thanks for any further suggestions in advance.
Kind regards
Martin





Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to