This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 5 replies, has 2 voices.

Last updated by Riffaz 3 weeks, 4 days ago.

Assigned support staff: Riffaz.

Author Posts
August 22, 2019 at 1:26 am #4435457

barjD

I am trying to:

Set up the Punjabi language in another script, but the pa code is taken, and I'm not sure how else to add this other script.

You see, Punjabi is written in two scripts:

Gurmukhi and Shahmukhi

On our website we need users to be able to view content in both languages (plus English, the default).

We started by setting up Punjabi translations using the Gurmukhi script, without adding a custom language.

Next we tried to add a custom language, to show translations in Shahmukhi. This is still Punjabi. But we are not allowed to use the "pa" code. This is problematic. It is actually still Punjabi, you see. There is no separate code for Shahmukhi. We searched and searched this issue and could not find an acceptable code for it. It is just another alphabet, not another language.

hidden link

I expected to see:

An addition of a custom language, still in Punjabi, but using another recognized script.

Instead, I got:

An error message saying the hreflang is already taken.

Can you help us solve this?

August 22, 2019 at 1:31 am #4435461

barjD

I am trying to:

Set up the Punjabi language in another script, but the pa code is taken, and I'm not sure how else to add this other script.

You see, Punjabi is written in two scripts:

Gurmukhi and Shahmukhi

On our website we need users to be able to view content in both languages (plus English, the default).

We started by setting up Punjabi translations using the Gurmukhi script, without adding a custom language.

Next we tried to add a custom language, to show translations in Shahmukhi. This is still Punjabi. But we are not allowed to use the "pa" code. This is problematic. It is actually still Punjabi, you see. There is no separate code for Shahmukhi. We searched and searched this issue and could not find an acceptable code for it. It is just another alphabet, not another language.

hidden link

I expected to see:

An addition of a custom language, still in Punjabi, but using another recognized script.

Instead, I got:

An error message saying the hreflang is already taken.

Can you help us solve this?

August 22, 2019 at 6:33 am #4436829

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Thank you for contacting WPML support.

WordPress does not allow to use the same locales for different languages or different variations of the same language.
you MUST use different locales/code for the language variation.

For example:
fr : French content, independent of region
fr-CA: French content, for users from Canada
fr-FR : French content, for users from France

This way you have to change your locale as well.
In case, you may use pa_sh for Shahmukhi

Let me know if you need anything else.

Regards,

August 23, 2019 at 4:37 am #4444117

barjD

Is "pa_sh" recognized by Google though? So it doesn't need to be specific to an internationally recognized code? Will Google still get that it is "pa" as a language code, that it is Punjabi?

August 25, 2019 at 12:37 am #4452363

barjD

Also, how can we change the Language switcher menu item of "Punjabi" to say "Gurmukhi" and not "Punjabi"? Because we used "Punjabi" in WPML to write text in Gurmukhi script.

I have tried to change the "translation" under "Edit language" but every time I enter "Gurmukhi" and click save, the settings go back to "Punjabi." It just won't save as "Gurmukhi" no matter what.

Can you tell me why? How can we fix this?

I also can't see a place in string translations for WPML, or any way to adjust the Language Switcher settings to modify these labels.

August 25, 2019 at 2:44 pm #4454161

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Is "pa_sh" recognized by Google though?
- no, it does not.
- that was an example to explain the things.
- for Punjabi you can see only this : hidden link
- But whatever it is, you CAN NOT use same locales in two languages.
- it is NOT a limitation by WPML
- This is how WordPress works.

I have tried to change the "translation" under "Edit language" but every time I enter "Gurmukhi" and click save, the settings go back to "Punjabi." It just won't save as "Gurmukhi" no matter what.
- this is a different issue from the initial question of this ticket.
- please open a new ticket to avoid the confusion and to reduce the waiting time. 🙂

Let me know if you need anything else.

Regards,

The topic ‘[Closed] One language, two scripts, but can't use the language code twice’ is closed to new replies.