I've successfully be able to register device with advanced tags like 'Language'. But after registration I could not update "Language" tag's value.

How do I update "Language" tag?

Thank you.

asked 04 Jun '14, 03:05
mkftr's gravatar image

mkftr
213

Hello,

Actually, our SDK handles all three default Tags by itself, for instance, the Language Tag value is exactly the default language on the device.

In case of custom Tags, you should simply send another setTags request, and the value would be updated.

permanent link
answered 04 Jun '14, 10:46
Dmitry%20%20Dyudeev's gravatar image

Dmitry Dyudeev
3.7k7

Hi, Thank you for your answer. I understood we can not modify special tags (eg. Language) But, I think the "Language" tag should refer OS's user language and should not refer OS's user locale?

It seems that the "Language" tag's value is loaded from

[NSLocale currentLocale]

But the value should be loaded like below?

NSArray languages = [NSLocale preferredLanguages]; NSString lang = [languages objectAtIndex:0];

Thank you.

(05 Jun '14, 08:04) mkftr mkftr's gravatar image

The SDK takes exactly the device's language as the Language Tag value. Here's the code from the SDK:

NSArray * languagesArr = (NSArray *) CFBridgingRelease(CFLocaleCopyPreferredLanguages());   
NSString * value = [languagesArr objectAtIndex:0];
(05 Jun '14, 09:58) Dmitry Dyudeev Dmitry%20%20Dyudeev's gravatar image

Thank you for sharing the code. You're right, it seems correct.

My main issue is that I can't update Language tag even changed preferred languages. For example, the request & response was like below, if I register my device with Language=ja and changed to "en" and called setTags.

  • setTags Request: {"request":{"tags":{"Language":"en"},"v":"2.2","hwid":"0DC5E1D8-AE28-4EAE-AA05-148C99A9397E"}}

  • loadTags Response: {"status_code":200,"status_message":"OK","response":{"result":{"Language":"ja","City":"jp, yokohama","Country":"JP"}}}

So, is there any way to update the Language Tag value?

(09 Jun '14, 02:57) mkftr mkftr's gravatar image
1

You are most welcome!

Please note that we update Language Tag value with the registerDevice request, as you can see in our guide.

Each time the registerDevice method is called, our servers update the language statistics in your Control Panel. We have just tested it, and everything seems to work properly.

(09 Jun '14, 10:13) Dmitry Dyudeev Dmitry%20%20Dyudeev's gravatar image

Finally I could update Language Tag with the registerDevice request. Thank you!

(10 Jun '14, 22:23) mkftr mkftr's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×353
×64
×37

question asked: 04 Jun '14, 03:05

question was seen: 923 times

last updated: 10 Jun '14, 22:23